PostgreSQL Source Code git master
|
#include "postgres_fe.h"
#include "access/transam.h"
#include "catalog/pg_class_d.h"
#include "pg_upgrade.h"
#include "pqexpbuffer.h"
Go to the source code of this file.
int count_old_cluster_logical_slots | ( | void | ) |
Definition at line 744 of file info.c.
References ClusterInfo::dbarr, DbInfoArr::dbs, DbInfoArr::ndbs, LogicalSlotInfoArr::nslots, old_cluster, and DbInfo::slot_arr.
Referenced by check_new_cluster_logical_replication_slots(), get_loadable_libraries(), and main().
|
static |
Definition at line 165 of file info.c.
References FileNameMap::db_oid, DbInfo::db_oid, new_cluster, FileNameMap::new_tablespace, FileNameMap::new_tablespace_suffix, RelInfo::nspname, FileNameMap::nspname, old_cluster, FileNameMap::old_tablespace, FileNameMap::old_tablespace_suffix, RelInfo::relfilenumber, FileNameMap::relfilenumber, RelInfo::relname, FileNameMap::relname, RelInfo::tablespace, and ClusterInfo::tablespace_suffix.
Referenced by gen_db_file_maps().
|
static |
Definition at line 775 of file info.c.
References DbInfo::db_name, DbInfoArr::dbs, free_rel_infos(), DbInfoArr::ndbs, pg_free(), and DbInfo::rel_arr.
Referenced by get_db_rel_and_slot_infos().
|
static |
Definition at line 791 of file info.c.
References RelInfoArr::nrels, RelInfo::nsp_alloc, RelInfo::nspname, pg_free(), RelInfo::relname, RelInfoArr::rels, RelInfo::tablespace, and RelInfo::tblsp_alloc.
Referenced by free_db_and_rel_infos().
FileNameMap * gen_db_file_maps | ( | DbInfo * | old_db, |
DbInfo * | new_db, | ||
int * | nmaps, | ||
const char * | old_pgdata, | ||
const char * | new_pgdata | ||
) |
Definition at line 45 of file info.c.
References create_rel_filename_map(), DbInfo::db_name, maps, RelInfoArr::nrels, RelInfo::nspname, pg_fatal, pg_log(), pg_malloc(), PG_WARNING, DbInfo::rel_arr, RelInfo::relname, RelInfo::reloid, RelInfoArr::rels, and report_unmatched_relation().
Referenced by transfer_all_new_dbs().
|
static |
Definition at line 404 of file info.c.
References atooid, cluster(), conn, connectToServer(), dbinfos, executeQueryOrDie(), GET_MAJOR_VERSION, pg_malloc0(), pg_strdup(), PQclear(), PQfinish(), PQfnumber(), PQgetvalue(), PQntuples(), QUERY_ALLOC, and snprintf.
Referenced by get_db_rel_and_slot_infos().
void get_db_rel_and_slot_infos | ( | ClusterInfo * | cluster | ) |
Definition at line 280 of file info.c.
References cluster(), free_db_and_rel_infos(), get_db_infos(), GET_MAJOR_VERSION, get_old_cluster_logical_slot_infos_query(), get_rel_infos_query(), get_template0_info(), log_opts, old_cluster, pg_free(), pg_log(), PG_VERBOSE, print_db_infos(), process_old_cluster_logical_slot_infos(), process_rel_infos(), upgrade_task_add_step(), upgrade_task_create(), upgrade_task_free(), upgrade_task_run(), and LogOpts::verbose.
Referenced by check_and_dump_old_cluster(), check_new_cluster(), and create_new_objects().
|
static |
Definition at line 652 of file info.c.
References UserOpts::live_check, psprintf(), and user_opts.
Referenced by get_db_rel_and_slot_infos().
|
static |
Definition at line 471 of file info.c.
References appendPQExpBuffer(), appendPQExpBufferStr(), CppAsString2, PQExpBufferData::data, FirstNormalObjectId, initPQExpBuffer(), UserOpts::transfer_mode, TRANSFER_MODE_SWAP, and user_opts.
Referenced by get_db_rel_and_slot_infos().
void get_subscription_count | ( | ClusterInfo * | cluster | ) |
Definition at line 760 of file info.c.
References cluster(), conn, connectToServer(), executeQueryOrDie(), PQclear(), PQfinish(), and PQgetvalue().
Referenced by check_and_dump_old_cluster().
|
static |
Definition at line 339 of file info.c.
References cluster(), conn, connectToServer(), executeQueryOrDie(), GET_MAJOR_VERSION, locale, pg_fatal, pg_malloc(), pg_strdup(), PQclear(), PQfinish(), PQfnumber(), PQgetisnull(), PQgetvalue(), and PQntuples().
Referenced by get_db_rel_and_slot_infos().
|
static |
Definition at line 809 of file info.c.
References DbInfo::db_name, DbInfoArr::dbs, DbInfoArr::ndbs, pg_log(), PG_VERBOSE, print_rel_infos(), print_slot_infos(), DbInfo::rel_arr, and DbInfo::slot_arr.
Referenced by get_db_rel_and_slot_infos().
|
static |
Definition at line 825 of file info.c.
References RelInfoArr::nrels, RelInfo::nspname, pg_log(), PG_VERBOSE, RelInfo::relname, RelInfo::reloid, RelInfoArr::rels, and RelInfo::tablespace.
Referenced by print_db_infos().
|
static |
Definition at line 838 of file info.c.
References LogicalSlotInfoArr::nslots, pg_log(), PG_VERBOSE, LogicalSlotInfo::plugin, LogicalSlotInfo::slotname, LogicalSlotInfoArr::slots, and LogicalSlotInfo::two_phase.
Referenced by print_db_infos().
|
static |
Definition at line 690 of file info.c.
References AssertVariableIsOfType, LogicalSlotInfo::caught_up, LogicalSlotInfo::failover, LogicalSlotInfo::invalid, LogicalSlotInfoArr::nslots, pg_malloc(), pg_strdup(), LogicalSlotInfo::plugin, PQfnumber(), PQgetvalue(), PQntuples(), process_old_cluster_logical_slot_infos(), DbInfo::slot_arr, LogicalSlotInfo::slotname, LogicalSlotInfoArr::slots, and LogicalSlotInfo::two_phase.
Referenced by get_db_rel_and_slot_infos(), and process_old_cluster_logical_slot_infos().
Definition at line 564 of file info.c.
References AssertVariableIsOfType, atooid, DbInfo::db_tablespace, RelInfo::indtable, RelInfoArr::nrels, RelInfo::nsp_alloc, RelInfo::nspname, pg_malloc(), pg_strdup(), PQfnumber(), PQgetvalue(), PQntuples(), process_rel_infos(), DbInfo::rel_arr, RelInfo::relfilenumber, RelInfo::relname, relname, RelInfo::reloid, RelInfoArr::rels, RelInfo::tablespace, tablespace, RelInfo::tblsp_alloc, and RelInfo::toastheap.
Referenced by get_db_rel_and_slot_infos(), and process_rel_infos().
|
static |
Definition at line 214 of file info.c.
References _, DbInfo::db_name, i, RelInfo::indtable, RelInfoArr::nrels, RelInfo::nspname, pg_log(), PG_WARNING, DbInfo::rel_arr, RelInfo::relname, RelInfo::reloid, RelInfoArr::rels, snprintf, and RelInfo::toastheap.
Referenced by gen_db_file_maps().