PostgreSQL Source Code
git master
|
#include "postgres_fe.h"
#include "access/transam.h"
#include "catalog/pg_class_d.h"
#include "pg_upgrade.h"
Go to the source code of this file.
Functions | |
static void | create_rel_filename_map (const char *old_data, const char *new_data, const DbInfo *old_db, const DbInfo *new_db, const RelInfo *old_rel, const RelInfo *new_rel, FileNameMap *map) |
static void | report_unmatched_relation (const RelInfo *rel, const DbInfo *db, bool is_new_db) |
static void | free_db_and_rel_infos (DbInfoArr *db_arr) |
static void | get_template0_info (ClusterInfo *cluster) |
static void | get_db_infos (ClusterInfo *cluster) |
static void | get_rel_infos (ClusterInfo *cluster, DbInfo *dbinfo) |
static void | free_rel_infos (RelInfoArr *rel_arr) |
static void | print_db_infos (DbInfoArr *db_arr) |
static void | print_rel_infos (RelInfoArr *rel_arr) |
FileNameMap * | gen_db_file_maps (DbInfo *old_db, DbInfo *new_db, int *nmaps, const char *old_pgdata, const char *new_pgdata) |
void | get_db_and_rel_infos (ClusterInfo *cluster) |
|
static |
Definition at line 160 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 605 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_and_rel_infos().
|
static |
Definition at line 621 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 40 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().
void get_db_and_rel_infos | ( | ClusterInfo * | cluster | ) |
Definition at line 275 of file info.c.
References cluster(), free_db_and_rel_infos(), get_db_infos(), get_rel_infos(), get_template0_info(), log_opts, old_cluster, pg_log(), PG_VERBOSE, print_db_infos(), and LogOpts::verbose.
Referenced by check_and_dump_old_cluster(), check_new_cluster(), and create_new_objects().
|
static |
Definition at line 362 of file info.c.
References atooid, cluster(), conn, connectToServer(), DbInfo::db_name, DbInfo::db_oid, executeQueryOrDie(), GET_MAJOR_VERSION, pg_malloc(), pg_strdup(), PQclear(), PQfinish(), PQfnumber(), PQgetvalue(), PQntuples(), QUERY_ALLOC, res, and snprintf.
Referenced by get_db_and_rel_infos().
|
static |
Definition at line 425 of file info.c.
References atooid, cluster(), conn, connectToServer(), CppAsString2, DbInfo::db_name, DbInfo::db_tablespace, executeQueryOrDie(), FirstNormalObjectId, RelInfo::indtable, RelInfoArr::nrels, RelInfo::nsp_alloc, RelInfo::nspname, pg_malloc(), pg_strdup(), PQclear(), PQfinish(), PQfnumber(), PQgetvalue(), PQntuples(), QUERY_ALLOC, DbInfo::rel_arr, RelInfo::relfilenumber, RelInfo::relname, relname, RelInfo::reloid, RelInfoArr::rels, res, snprintf, RelInfo::tablespace, tablespace, RelInfo::tblsp_alloc, and RelInfo::toastheap.
Referenced by get_db_and_rel_infos().
|
static |
Definition at line 303 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_and_rel_infos().
|
static |
Definition at line 639 of file info.c.
References DbInfo::db_name, DbInfoArr::dbs, DbInfoArr::ndbs, pg_log(), PG_VERBOSE, print_rel_infos(), and DbInfo::rel_arr.
Referenced by get_db_and_rel_infos().
|
static |
Definition at line 652 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 209 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().