|
PostgreSQL Source Code git master
|
#include "postgres_fe.h"#include "catalog/pg_am_d.h"#include "catalog/pg_authid_d.h"#include "catalog/pg_class_d.h"#include "fe_utils/string_utils.h"#include "pg_upgrade.h"#include "common/unicode_version.h"
Go to the source code of this file.
Data Structures | |
| struct | DataTypesUsageChecks |
| struct | data_type_check_state |
Macros | |
| #define | MANUAL_CHECK 1 |
| #define | ALL_VERSIONS -1 |
Variables | |
| static DataTypesUsageChecks | data_types_usage_checks [] |
Definition at line 591 of file check.c.
References UserOpts::check, check_for_connection_status(), check_for_data_types_usage(), check_for_gist_inet_ops(), check_for_incompatible_polymorphics(), check_for_isn_and_int8_passing_mismatch(), check_for_not_null_inheritance(), check_for_pg_role_prefix(), check_for_prepared_transactions(), check_for_tables_with_oids(), check_for_unicode_update(), check_for_user_defined_encoding_conversions(), check_for_user_defined_postfix_ops(), check_is_install_user(), check_old_cluster_for_valid_slots(), check_old_cluster_global_names(), check_old_cluster_subscription_state(), generate_old_dump(), get_db_rel_and_slot_infos(), get_loadable_libraries(), GET_MAJOR_VERSION, get_subscription_info(), init_tablespaces(), UserOpts::live_check, ClusterInfo::major_version, old_9_6_invalidate_hash_indexes(), old_cluster, start_postmaster(), stop_postmaster(), and user_opts.
Referenced by main().
Definition at line 930 of file check.c.
References check_control_data(), ClusterInfo::controldata, get_control_data(), UserOpts::live_check, new_cluster, old_cluster, pg_fatal, ClusterInfo::port, and user_opts.
Referenced by main().
Definition at line 875 of file check.c.
References Assert, ClusterInfo::bin_version, UserOpts::char_signedness, check_ok(), fb(), GET_MAJOR_VERSION, ClusterInfo::major_version, new_cluster, old_cluster, pg_fatal, prep_status(), and user_opts.
Referenced by main().
|
static |
Definition at line 1161 of file check.c.
References LogOpts::basedir, check_ok(), cluster(), connectToServer(), datallowconn, datconnlimit, datname, executeQueryOrDie(), fb(), fopen_priv, fprintf, log_opts, MAXPGPATH, pg_fatal, pg_log(), PG_REPORT, PQclear, PQfinish(), PQfnumber(), PQgetvalue, PQntuples, prep_status(), and snprintf.
Referenced by check_and_dump_old_cluster().
|
static |
Definition at line 466 of file check.c.
References ALL_VERSIONS, Assert, data_type_check_state::check, check_ok(), cluster(), PQExpBufferData::data, data_type_check_query(), data_types_usage_checks, destroyPQExpBuffer(), fb(), GET_MAJOR_VERSION, i, MANUAL_CHECK, pg_fatal, pg_free(), pg_malloc0_array, prep_status(), process_data_type_check(), data_type_check_state::report, DataTypesUsageChecks::status, DataTypesUsageChecks::threshold_version, upgrade_task_add_step(), upgrade_task_create(), upgrade_task_free(), upgrade_task_run(), and DataTypesUsageChecks::version_hook.
Referenced by check_and_dump_old_cluster().
|
static |
Definition at line 1768 of file check.c.
References LogOpts::basedir, check_ok(), cluster(), CppAsString2, fb(), UpgradeTaskReport::file, log_opts, UpgradeTaskReport::path, pg_fatal, pg_log(), PG_REPORT, prep_status(), process_gist_inet_ops_check(), snprintf, upgrade_task_add_step(), upgrade_task_create(), upgrade_task_free(), and upgrade_task_run().
Referenced by check_and_dump_old_cluster().
|
static |
Definition at line 1485 of file check.c.
References appendPQExpBufferStr(), LogOpts::basedir, check_ok(), cluster(), fb(), UpgradeTaskReport::file, GET_MAJOR_VERSION, initPQExpBuffer(), log_opts, UpgradeTaskReport::path, pg_fatal, pg_free(), pg_log(), PG_REPORT, prep_status(), process_incompat_polymorphics(), psprintf(), snprintf, termPQExpBuffer(), upgrade_task_add_step(), upgrade_task_create(), upgrade_task_free(), and upgrade_task_run().
Referenced by check_and_dump_old_cluster().
|
static |
Definition at line 1312 of file check.c.
References LogOpts::basedir, check_ok(), cluster(), ClusterInfo::controldata, fb(), UpgradeTaskReport::file, ControlData::float8_pass_by_value, log_opts, new_cluster, old_cluster, UpgradeTaskReport::path, pg_fatal, pg_log(), PG_REPORT, prep_status(), process_isn_and_int8_passing_mismatch(), snprintf, upgrade_task_add_step(), upgrade_task_create(), upgrade_task_free(), and upgrade_task_run().
Referenced by check_and_dump_old_cluster().
Definition at line 976 of file check.c.
References check_ok(), fb(), MAXPGPATH, new_cluster, ClusterInfo::num_tablespaces, pg_fatal, prep_status(), snprintf, stat, ClusterInfo::tablespace_suffix, and ClusterInfo::tablespaces.
Referenced by check_new_cluster().
|
static |
Definition at line 1689 of file check.c.
References LogOpts::basedir, check_ok(), cluster(), fb(), UpgradeTaskReport::file, log_opts, UpgradeTaskReport::path, pg_fatal, pg_log(), PG_REPORT, prep_status(), process_inconsistent_notnull(), snprintf, upgrade_task_add_step(), upgrade_task_create(), upgrade_task_free(), and upgrade_task_run().
Referenced by check_and_dump_old_cluster().
|
static |
Definition at line 1814 of file check.c.
References LogOpts::basedir, check_ok(), cluster(), conn, connectToServer(), executeQueryOrDie(), fb(), fopen_priv, fprintf, log_opts, MAXPGPATH, pg_fatal, pg_log(), PG_REPORT, PQclear, PQfinish(), PQfnumber(), PQgetvalue, PQntuples, prep_status(), and snprintf.
Referenced by check_and_dump_old_cluster().
|
static |
Definition at line 1249 of file check.c.
References check_ok(), cluster(), conn, connectToServer(), executeQueryOrDie(), old_cluster, pg_fatal, PQclear, PQfinish(), PQntuples, and prep_status().
Referenced by check_and_dump_old_cluster(), and check_new_cluster().
|
static |
Definition at line 1612 of file check.c.
References LogOpts::basedir, check_ok(), cluster(), fb(), UpgradeTaskReport::file, log_opts, UpgradeTaskReport::path, pg_fatal, pg_log(), PG_REPORT, prep_status(), process_with_oids_check(), snprintf, upgrade_task_add_step(), upgrade_task_create(), upgrade_task_free(), and upgrade_task_run().
Referenced by check_and_dump_old_cluster().
|
static |
Definition at line 2006 of file check.c.
References LogOpts::basedir, check_ok(), cluster(), fb(), UpgradeTaskReport::file, GET_MAJOR_VERSION, log_opts, UpgradeTaskReport::path, pg_log(), PG_WARNING, prep_status(), process_unicode_update(), report_status(), snprintf, unicode_version_changed(), upgrade_task_add_step(), upgrade_task_create(), upgrade_task_free(), and upgrade_task_run().
Referenced by check_and_dump_old_cluster().
|
static |
Definition at line 1900 of file check.c.
References LogOpts::basedir, check_ok(), cluster(), fb(), UpgradeTaskReport::file, log_opts, UpgradeTaskReport::path, pg_fatal, pg_log(), PG_REPORT, prep_status(), process_user_defined_encoding_conversions(), snprintf, upgrade_task_add_step(), upgrade_task_create(), upgrade_task_free(), and upgrade_task_run().
Referenced by check_and_dump_old_cluster().
|
static |
Definition at line 1397 of file check.c.
References LogOpts::basedir, check_ok(), cluster(), fb(), UpgradeTaskReport::file, log_opts, UpgradeTaskReport::path, pg_fatal, pg_log(), PG_REPORT, prep_status(), process_user_defined_postfix_ops(), snprintf, upgrade_task_add_step(), upgrade_task_create(), upgrade_task_free(), and upgrade_task_run().
Referenced by check_and_dump_old_cluster().
|
static |
Definition at line 1103 of file check.c.
References atooid, check_ok(), cluster(), conn, connectToServer(), executeQueryOrDie(), fb(), new_cluster, os_info, pg_fatal, PQclear, PQfinish(), PQgetvalue, PQntuples, prep_status(), and OSInfo::user.
Referenced by check_and_dump_old_cluster(), and check_new_cluster().
Definition at line 735 of file check.c.
References check_copy_file_range(), check_file_clone(), check_for_new_tablespace_dir(), check_for_prepared_transactions(), check_hard_link(), check_is_install_user(), check_loadable_libraries(), check_new_cluster_is_empty(), check_new_cluster_replication_slots(), check_new_cluster_subscription_configuration(), get_db_rel_and_slot_infos(), GET_MAJOR_VERSION, ClusterInfo::major_version, new_cluster, old_cluster, pg_fatal, UserOpts::transfer_mode, TRANSFER_MODE_CLONE, TRANSFER_MODE_COPY, TRANSFER_MODE_COPY_FILE_RANGE, TRANSFER_MODE_LINK, TRANSFER_MODE_SWAP, and user_opts.
Referenced by main().
Definition at line 944 of file check.c.
References DbInfo::db_name, ClusterInfo::dbarr, DbInfoArr::dbs, fb(), DbInfoArr::ndbs, new_cluster, RelInfoArr::nrels, RelInfo::nspname, pg_fatal, DbInfo::rel_arr, RelInfo::relname, and RelInfoArr::rels.
Referenced by check_new_cluster().
Definition at line 2140 of file check.c.
References Assert, check_ok(), conn, connectToServer(), count_old_cluster_logical_slots(), executeQueryOrDie(), fb(), GET_MAJOR_VERSION, ClusterInfo::major_version, max_replication_slots, new_cluster, old_cluster, pg_fatal, PQclear, PQfinish(), PQfnumber(), PQgetvalue, PQntuples, prep_status(), ClusterInfo::sub_retain_dead_tuples, and wal_level.
Referenced by check_new_cluster().
Definition at line 2248 of file check.c.
References check_ok(), conn, connectToServer(), executeQueryOrDie(), fb(), GET_MAJOR_VERSION, ClusterInfo::major_version, max_active_replication_origins, new_cluster, ClusterInfo::nsubs, old_cluster, pg_fatal, PQclear, PQfinish(), PQgetvalue, PQntuples, and prep_status().
Referenced by check_new_cluster().
Definition at line 2291 of file check.c.
References LogOpts::basedir, LogicalSlotInfo::caught_up, check_ok(), ClusterInfo::dbarr, DbInfoArr::dbs, fb(), fopen_priv, fprintf, LogicalSlotInfo::invalid, UserOpts::live_check, log_opts, MAXPGPATH, DbInfoArr::ndbs, LogicalSlotInfoArr::nslots, old_cluster, pg_fatal, pg_log(), PG_REPORT, prep_status(), DbInfo::slot_arr, LogicalSlotInfo::slotname, LogicalSlotInfoArr::slots, snprintf, and user_opts.
Referenced by check_and_dump_old_cluster().
|
static |
Definition at line 2520 of file check.c.
References LogOpts::basedir, check_ok(), cluster(), connectToServer(), executeQueryOrDie(), fb(), fopen_priv, fprintf, i, log_opts, MAXPGPATH, pg_fatal, pg_log(), PG_REPORT, PQclear, PQfinish(), PQgetvalue, PQntuples, prep_status(), and snprintf.
Referenced by check_and_dump_old_cluster().
Definition at line 2413 of file check.c.
References LogOpts::basedir, check_ok(), conn, connectToServer(), DbInfo::db_name, ClusterInfo::dbarr, DbInfoArr::dbs, executeQueryOrDie(), fb(), UpgradeTaskReport::file, fopen_priv, fprintf, i, log_opts, old_cluster, UpgradeTaskReport::path, pg_fatal, pg_log(), PG_REPORT, PQclear, PQfinish(), PQgetvalue, PQntuples, prep_status(), process_old_sub_state_check(), snprintf, upgrade_task_add_step(), upgrade_task_create(), upgrade_task_free(), and upgrade_task_run().
Referenced by check_and_dump_old_cluster().
Definition at line 1005 of file check.c.
References canonicalize_path(), check_ok(), fb(), fix_path_separator(), fopen_priv, fprintf, MAXPGPATH, new_cluster, ClusterInfo::num_tablespaces, old_cluster, path_is_prefix_of_path(), PATH_QUOTE, pfree(), pg_fatal, pg_free(), pg_log(), pg_strdup(), PG_WARNING, ClusterInfo::pgdata, prep_status(), psprintf(), RMDIR_CMD, S_IRWXU, SCRIPT_EXT, SCRIPT_PREFIX, strlcpy(), ClusterInfo::tablespace_suffix, and ClusterInfo::tablespaces.
Referenced by main().
Definition at line 337 of file check.c.
References DataTypesUsageChecks::base_query, CppAsString2, data_types_usage_checks, fb(), and psprintf().
Referenced by check_for_data_types_usage().
Definition at line 552 of file check.c.
References pg_strdup(), and data_type_check_state::result.
Referenced by create_script_for_old_cluster_deletion().
Definition at line 817 of file check.c.
References GET_MAJOR_VERSION, ClusterInfo::major_version, new_cluster, old_9_6_invalidate_hash_indexes(), old_cluster, report_extension_updates(), start_postmaster(), and stop_postmaster().
Referenced by main().
Definition at line 573 of file check.c.
References UserOpts::live_check, pg_log(), PG_REPORT, and user_opts.
Referenced by main().
Definition at line 838 of file check.c.
References appendPQExpBufferChar(), appendPQExpBufferStr(), appendShellString(), ClusterInfo::bindir, fb(), initPQExpBuffer(), new_cluster, os_info, pg_log(), PG_REPORT, termPQExpBuffer(), OSInfo::user, and OSInfo::user_specified.
Referenced by main().
Definition at line 394 of file check.c.
References _, appendPQExpBuffer(), arg, LogOpts::basedir, createPQExpBuffer(), DbInfo::db_name, fb(), fopen_priv, fprintf, log_opts, MAXPGPATH, pg_fatal, pg_log(), PG_REPORT, PQfnumber(), PQgetvalue, PQntuples, and snprintf.
Referenced by check_for_data_types_usage().
Definition at line 1740 of file check.c.
References arg, DbInfo::db_name, fb(), UpgradeTaskReport::file, fopen_priv, fprintf, UpgradeTaskReport::path, pg_fatal, PQfnumber(), PQgetvalue, and PQntuples.
Referenced by check_for_gist_inet_ops().
Definition at line 1456 of file check.c.
References arg, DbInfo::db_name, fb(), UpgradeTaskReport::file, fopen_priv, fprintf, UpgradeTaskReport::path, pg_fatal, PQfnumber(), PQgetvalue, and PQntuples.
Referenced by check_for_incompatible_polymorphics().
Definition at line 1654 of file check.c.
References arg, DbInfo::db_name, fb(), UpgradeTaskReport::file, fopen_priv, fprintf, UpgradeTaskReport::path, pg_fatal, PQfnumber(), PQgetvalue, and PQntuples.
Referenced by check_for_not_null_inheritance().
|
static |
Definition at line 1282 of file check.c.
References arg, DbInfo::db_name, fb(), UpgradeTaskReport::file, fopen_priv, fprintf, UpgradeTaskReport::path, pg_fatal, PQfnumber(), PQgetvalue, and PQntuples.
Referenced by check_for_isn_and_int8_passing_mismatch().
Definition at line 2380 of file check.c.
References arg, DbInfo::db_name, fb(), UpgradeTaskReport::file, fopen_priv, fprintf, i, UpgradeTaskReport::path, pg_fatal, PQfnumber(), PQgetvalue, and PQntuples.
Referenced by check_old_cluster_subscription_state().
Definition at line 1952 of file check.c.
References arg, DbInfo::db_name, fb(), UpgradeTaskReport::file, fopen_priv, fprintf, UpgradeTaskReport::path, pg_fatal, PQfnumber(), PQgetvalue, and PQntuples.
Referenced by check_for_unicode_update().
|
static |
Definition at line 1872 of file check.c.
References arg, DbInfo::db_name, fb(), UpgradeTaskReport::file, fopen_priv, fprintf, UpgradeTaskReport::path, pg_fatal, PQfnumber(), PQgetvalue, and PQntuples.
Referenced by check_for_user_defined_encoding_conversions().
Definition at line 1365 of file check.c.
References arg, DbInfo::db_name, fb(), UpgradeTaskReport::file, fopen_priv, fprintf, UpgradeTaskReport::path, pg_fatal, PQfnumber(), PQgetvalue, and PQntuples.
Referenced by check_for_user_defined_postfix_ops().
Definition at line 1586 of file check.c.
References arg, DbInfo::db_name, fb(), UpgradeTaskReport::file, fopen_priv, fprintf, UpgradeTaskReport::path, pg_fatal, PQfnumber(), PQgetvalue, and PQntuples.
Referenced by check_for_tables_with_oids().
Definition at line 798 of file check.c.
References UserOpts::check, cleanup_output_dirs(), fb(), pg_log(), PG_REPORT, stop_postmaster(), and user_opts.
Referenced by main().
|
static |
Definition at line 1981 of file check.c.
References cluster(), connectToServer(), executeQueryOrDie(), fb(), PG_UNICODE_VERSION, PQclear, PQfinish(), and PQgetvalue.
Referenced by check_for_unicode_update().
|
static |
Definition at line 101 of file check.c.
Referenced by check_for_data_types_usage(), and data_type_check_query().