12 #include "catalog/pg_authid_d.h"
31 const char *datatype);
59 for (
c = result; *
c !=
'\0';
c++)
76 "Performing Consistency Checks on Old Live Server\n"
77 "------------------------------------------------");
82 "Performing Consistency Checks\n"
83 "-----------------------------");
272 "If pg_upgrade fails after this point, you must re-initdb the\n"
273 "new cluster before continuing.");
312 "Optimizer statistics are not transferred by pg_upgrade.\n"
313 "Once you start the new server, consider running:\n"
316 if (deletion_script_file_name)
318 "Running this script will delete the old cluster's data files:\n"
320 deletion_script_file_name);
323 "Could not create a script to delete the old cluster's data files\n"
324 "because user-defined tablespaces or the new cluster's data directory\n"
325 "exist in the old cluster directory. The old cluster's contents must\n"
326 "be deleted manually.");
347 pg_fatal(
"This utility can only upgrade from PostgreSQL version %s and later.",
352 pg_fatal(
"This utility can only upgrade to PostgreSQL version %s.",
361 pg_fatal(
"This utility cannot be used to downgrade to older major PostgreSQL versions.");
366 pg_fatal(
"Old cluster data and binary directories are from different major versions.");
369 pg_fatal(
"New cluster data and binary directories are from different major versions.");
384 pg_fatal(
"When checking a live server, "
385 "the old and new port numbers must be different.");
399 for (relnum = 0; relnum < rel_arr->
nrels;
403 if (strcmp(rel_arr->
rels[relnum].
nspname,
"pg_catalog") != 0)
404 pg_fatal(
"New cluster database \"%s\" is not empty: found relation \"%s.%s\"",
427 prep_status(
"Checking for new cluster tablespace directories");
437 if (
stat(new_tablespace_dir, &statbuf) == 0 || errno != ENOENT)
438 pg_fatal(
"new cluster tablespace directory already exists: \"%s\"",
458 *deletion_script_file_name =
psprintf(
"%sdelete_old_cluster.%s",
471 "\nWARNING: new data directory should not be inside the old data directory, i.e. %s", old_cluster_pgdata);
474 unlink(*deletion_script_file_name);
475 pg_free(*deletion_script_file_name);
476 *deletion_script_file_name = NULL;
495 "\nWARNING: user-defined tablespace locations should not be inside the data directory, i.e. %s", old_tablespace_dir);
498 unlink(*deletion_script_file_name);
499 pg_free(*deletion_script_file_name);
500 *deletion_script_file_name = NULL;
505 prep_status(
"Creating script to delete old cluster");
507 if ((script =
fopen_priv(*deletion_script_file_name,
"w")) == NULL)
508 pg_fatal(
"could not open file \"%s\": %m",
509 *deletion_script_file_name);
513 fprintf(script,
"#!/bin/sh\n\n");
558 if (chmod(*deletion_script_file_name,
S_IRWXU) != 0)
559 pg_fatal(
"could not add execute permission to file \"%s\": %m",
560 *deletion_script_file_name);
579 prep_status(
"Checking database user is the install user");
583 "SELECT rolsuper, oid "
584 "FROM pg_catalog.pg_roles "
585 "WHERE rolname = current_user "
586 "AND rolname !~ '^pg_'");
595 pg_fatal(
"database user \"%s\" is not the install user",
602 "FROM pg_catalog.pg_roles "
603 "WHERE rolname !~ '^pg_'");
606 pg_fatal(
"could not determine the number of users");
614 pg_fatal(
"Only the install user can be defined in the new cluster.");
643 prep_status(
"Checking database connection settings");
645 snprintf(output_path,
sizeof(output_path),
"%s/%s",
647 "databases_with_datallowconn_false.txt");
653 "SELECT datname, datallowconn "
654 "FROM pg_catalog.pg_database");
657 i_datallowconn =
PQfnumber(dbres,
"datallowconn");
660 for (dbnum = 0; dbnum < ntups; dbnum++)
665 if (strcmp(
datname,
"template0") == 0)
669 pg_fatal(
"template0 must not allow connections, "
670 "i.e. its pg_database.datallowconn must be false");
680 if (script == NULL && (script =
fopen_priv(output_path,
"w")) == NULL)
681 pg_fatal(
"could not open file \"%s\": %m", output_path);
696 pg_fatal(
"All non-template0 databases must allow connections, i.e. their\n"
697 "pg_database.datallowconn must be true. Your installation contains\n"
698 "non-template0 databases with their pg_database.datallowconn set to\n"
699 "false. Consider allowing connection for all non-template0 databases\n"
700 "or drop the databases which do not allow connections. A list of\n"
701 "databases with the problem is in the file:\n"
725 "FROM pg_catalog.pg_prepared_xacts");
730 pg_fatal(
"The source cluster contains prepared transactions");
732 pg_fatal(
"The target cluster contains prepared transactions");
757 prep_status(
"Checking for contrib/isn with bigint-passing mismatch");
767 snprintf(output_path,
sizeof(output_path),
"%s/%s",
769 "contrib_isn_and_int8_pass_by_value.txt");
771 for (dbnum = 0; dbnum <
cluster->dbarr.ndbs; dbnum++)
774 bool db_used =
false;
784 "SELECT n.nspname, p.proname "
785 "FROM pg_catalog.pg_proc p, "
786 " pg_catalog.pg_namespace n "
787 "WHERE p.pronamespace = n.oid AND "
788 " p.probin = '$libdir/isn'");
793 for (rowno = 0; rowno < ntups; rowno++)
795 if (script == NULL && (script =
fopen_priv(output_path,
"w")) == NULL)
796 pg_fatal(
"could not open file \"%s\": %m", output_path);
816 pg_fatal(
"Your installation contains \"contrib/isn\" functions which rely on the\n"
817 "bigint data type. Your old and new clusters pass bigint values\n"
818 "differently so this cluster cannot currently be upgraded. You can\n"
819 "manually dump databases in the old cluster that use \"contrib/isn\"\n"
820 "facilities, drop them, perform the upgrade, and then restore them. A\n"
821 "list of the problem functions is in the file:\n"
838 prep_status(
"Checking for user-defined postfix operators");
840 snprintf(output_path,
sizeof(output_path),
"%s/%s",
845 for (dbnum = 0; dbnum <
cluster->dbarr.ndbs; dbnum++)
848 bool db_used =
false;
866 "SELECT o.oid AS oproid, "
867 " n.nspname AS oprnsp, "
869 " tn.nspname AS typnsp, "
871 "FROM pg_catalog.pg_operator o, "
872 " pg_catalog.pg_namespace n, "
873 " pg_catalog.pg_type t, "
874 " pg_catalog.pg_namespace tn "
875 "WHERE o.oprnamespace = n.oid AND "
876 " o.oprleft = t.oid AND "
877 " t.typnamespace = tn.oid AND "
878 " o.oprright = 0 AND "
886 for (rowno = 0; rowno < ntups; rowno++)
888 if (script == NULL &&
889 (script =
fopen_priv(output_path,
"w")) == NULL)
890 pg_fatal(
"could not open file \"%s\": %m", output_path);
896 fprintf(script,
" (oid=%s) %s.%s (%s.%s, NONE)\n",
913 pg_fatal(
"Your installation contains user-defined postfix operators, which are not\n"
914 "supported anymore. Consider dropping the postfix operators and replacing\n"
915 "them with prefix operators or function calls.\n"
916 "A list of user-defined postfix operators is in the file:\n"
937 prep_status(
"Checking for incompatible polymorphic functions");
939 snprintf(output_path,
sizeof(output_path),
"%s/%s",
941 "incompatible_polymorphics.txt");
947 "'array_append(anyarray,anyelement)'"
948 ", 'array_cat(anyarray,anyarray)'"
949 ", 'array_prepend(anyelement,anyarray)'");
953 ", 'array_remove(anyarray,anyelement)'"
954 ", 'array_replace(anyarray,anyelement,anyelement)'");
958 ", 'array_position(anyarray,anyelement)'"
959 ", 'array_position(anyarray,anyelement,integer)'"
960 ", 'array_positions(anyarray,anyelement)'"
961 ", 'width_bucket(anyelement,anyarray)'");
963 for (
int dbnum = 0; dbnum <
cluster->dbarr.ndbs; dbnum++)
965 bool db_used =
false;
980 "SELECT 'aggregate' AS objkind, p.oid::regprocedure::text AS objname "
982 "JOIN pg_aggregate AS a ON a.aggfnoid=p.oid "
983 "JOIN pg_proc AS transfn ON transfn.oid=a.aggtransfn "
984 "WHERE p.oid >= 16384 "
985 "AND a.aggtransfn = ANY(ARRAY[%s]::regprocedure[]) "
986 "AND a.aggtranstype = ANY(ARRAY['anyarray', 'anyelement']::regtype[]) "
990 "SELECT 'aggregate' AS objkind, p.oid::regprocedure::text AS objname "
992 "JOIN pg_aggregate AS a ON a.aggfnoid=p.oid "
993 "JOIN pg_proc AS finalfn ON finalfn.oid=a.aggfinalfn "
994 "WHERE p.oid >= 16384 "
995 "AND a.aggfinalfn = ANY(ARRAY[%s]::regprocedure[]) "
996 "AND a.aggtranstype = ANY(ARRAY['anyarray', 'anyelement']::regtype[]) "
1000 "SELECT 'operator' AS objkind, op.oid::regoperator::text AS objname "
1001 "FROM pg_operator AS op "
1002 "WHERE op.oid >= 16384 "
1003 "AND oprcode = ANY(ARRAY[%s]::regprocedure[]) "
1004 "AND oprleft = ANY(ARRAY['anyarray', 'anyelement']::regtype[]);",
1005 old_polymorphics.
data,
1006 old_polymorphics.
data,
1007 old_polymorphics.
data);
1014 for (
int rowno = 0; rowno < ntups; rowno++)
1016 if (script == NULL &&
1017 (script =
fopen_priv(output_path,
"w")) == NULL)
1018 pg_fatal(
"could not open file \"%s\": %m", output_path);
1038 pg_fatal(
"Your installation contains user-defined objects that refer to internal\n"
1039 "polymorphic functions with arguments of type \"anyarray\" or \"anyelement\".\n"
1040 "These user-defined objects must be dropped before upgrading and restored\n"
1041 "afterwards, changing them to refer to the new corresponding functions with\n"
1042 "arguments of type \"anycompatiblearray\" and \"anycompatible\".\n"
1043 "A list of the problematic objects is in the file:\n"
1044 " %s", output_path);
1059 FILE *script = NULL;
1064 snprintf(output_path,
sizeof(output_path),
"%s/%s",
1066 "tables_with_oids.txt");
1069 for (dbnum = 0; dbnum <
cluster->dbarr.ndbs; dbnum++)
1072 bool db_used =
false;
1081 "SELECT n.nspname, c.relname "
1082 "FROM pg_catalog.pg_class c, "
1083 " pg_catalog.pg_namespace n "
1084 "WHERE c.relnamespace = n.oid AND "
1086 " n.nspname NOT IN ('pg_catalog')");
1091 for (rowno = 0; rowno < ntups; rowno++)
1093 if (script == NULL && (script =
fopen_priv(output_path,
"w")) == NULL)
1094 pg_fatal(
"could not open file \"%s\": %m", output_path);
1114 pg_fatal(
"Your installation contains tables declared WITH OIDS, which is not\n"
1115 "supported anymore. Consider removing the oid column using\n"
1116 " ALTER TABLE ... SET WITHOUT OIDS;\n"
1117 "A list of tables with the problem is in the file:\n"
1118 " %s", output_path);
1142 prep_status(
"Checking for system-defined composite types in user tables");
1144 snprintf(output_path,
sizeof(output_path),
"%s/%s",
1146 "tables_using_composite.txt");
1159 firstUserOid = 16384;
1161 base_query =
psprintf(
"SELECT t.oid FROM pg_catalog.pg_type t "
1162 "LEFT JOIN pg_catalog.pg_namespace n ON t.typnamespace = n.oid "
1163 " WHERE typtype = 'c' AND (t.oid < %u OR nspname = 'information_schema')",
1173 pg_fatal(
"Your installation contains system-defined composite types in user tables.\n"
1174 "These type OIDs are not stable across PostgreSQL versions,\n"
1175 "so this cluster cannot currently be upgraded. You can\n"
1176 "drop the problem columns and restart the upgrade.\n"
1177 "A list of the problem columns is in the file:\n"
1178 " %s", output_path);
1201 prep_status(
"Checking for reg* data types in user tables");
1203 snprintf(output_path,
sizeof(output_path),
"%s/%s",
1205 "tables_using_reg.txt");
1212 "SELECT oid FROM pg_catalog.pg_type t "
1213 "WHERE t.typnamespace = "
1214 " (SELECT oid FROM pg_catalog.pg_namespace "
1215 " WHERE nspname = 'pg_catalog') "
1216 " AND t.typname IN ( "
1220 " 'regdictionary', "
1234 pg_fatal(
"Your installation contains one of the reg* data types in user tables.\n"
1235 "These data types reference system OIDs that are not preserved by\n"
1236 "pg_upgrade, so this cluster cannot currently be upgraded. You can\n"
1237 "drop the problem columns and restart the upgrade.\n"
1238 "A list of the problem columns is in the file:\n"
1239 " %s", output_path);
1255 prep_status(
"Checking for incompatible \"%s\" data type in user tables",
1258 snprintf(output_path,
sizeof(output_path),
"tables_using_aclitem.txt");
1263 pg_fatal(
"Your installation contains the \"aclitem\" data type in user tables.\n"
1264 "The internal format of \"aclitem\" changed in PostgreSQL version 16\n"
1265 "so this cluster cannot currently be upgraded. You can drop the\n"
1266 "problem columns and restart the upgrade. A list of the problem\n"
1267 "columns is in the file:\n"
1268 " %s", output_path);
1282 const char *datatype)
1287 prep_status(
"Checking for removed \"%s\" data type in user tables",
1290 snprintf(output_path,
sizeof(output_path),
"tables_using_%s.txt",
1292 snprintf(
typename,
sizeof(
typename),
"pg_catalog.%s", datatype);
1297 pg_fatal(
"Your installation contains the \"%s\" data type in user tables.\n"
1298 "The \"%s\" type has been removed in PostgreSQL version %s,\n"
1299 "so this cluster cannot currently be upgraded. You can drop the\n"
1300 "problem columns, or change them to another data type, and restart\n"
1301 "the upgrade. A list of the problem columns is in the file:\n"
1302 " %s", datatype, datatype, version, output_path);
1319 prep_status(
"Checking for incompatible \"jsonb\" data type");
1321 snprintf(output_path,
sizeof(output_path),
"%s/%s",
1323 "tables_using_jsonb.txt");
1328 pg_fatal(
"Your installation contains the \"jsonb\" data type in user tables.\n"
1329 "The internal format of \"jsonb\" changed during 9.4 beta so this\n"
1330 "cluster cannot currently be upgraded. You can\n"
1331 "drop the problem columns and restart the upgrade.\n"
1332 "A list of the problem columns is in the file:\n"
1333 " %s", output_path);
1352 FILE *script = NULL;
1355 prep_status(
"Checking for roles starting with \"pg_\"");
1357 snprintf(output_path,
sizeof(output_path),
"%s/%s",
1359 "pg_role_prefix.txt");
1362 "SELECT oid AS roloid, rolname "
1363 "FROM pg_catalog.pg_roles "
1364 "WHERE rolname ~ '^pg_'");
1369 for (
int rowno = 0; rowno < ntups; rowno++)
1371 if (script == NULL && (script =
fopen_priv(output_path,
"w")) == NULL)
1372 pg_fatal(
"could not open file \"%s\": %m", output_path);
1373 fprintf(script,
"%s (oid=%s)\n",
1386 pg_fatal(
"Your installation contains roles starting with \"pg_\".\n"
1387 "\"pg_\" is a reserved prefix for system roles. The cluster\n"
1388 "cannot be upgraded until these roles are renamed.\n"
1389 "A list of roles starting with \"pg_\" is in the file:\n"
1390 " %s", output_path);
1403 FILE *script = NULL;
1406 prep_status(
"Checking for user-defined encoding conversions");
1408 snprintf(output_path,
sizeof(output_path),
"%s/%s",
1410 "encoding_conversions.txt");
1413 for (dbnum = 0; dbnum <
cluster->dbarr.ndbs; dbnum++)
1416 bool db_used =
false;
1432 "SELECT c.oid as conoid, c.conname, n.nspname "
1433 "FROM pg_catalog.pg_conversion c, "
1434 " pg_catalog.pg_namespace n "
1435 "WHERE c.connamespace = n.oid AND "
1441 for (rowno = 0; rowno < ntups; rowno++)
1443 if (script == NULL &&
1444 (script =
fopen_priv(output_path,
"w")) == NULL)
1445 pg_fatal(
"could not open file \"%s\": %m", output_path);
1451 fprintf(script,
" (oid=%s) %s.%s\n",
1466 pg_fatal(
"Your installation contains user-defined encoding conversions.\n"
1467 "The conversion function parameters changed in PostgreSQL version 14\n"
1468 "so this cluster cannot currently be upgraded. You can remove the\n"
1469 "encoding conversions in the old cluster and restart the upgrade.\n"
1470 "A list of user-defined encoding conversions is in the file:\n"
1471 " %s", output_path);
1500 if (nslots_on_old == 0)
1505 prep_status(
"Checking for new cluster logical replication slots");
1508 "FROM pg_catalog.pg_replication_slots "
1509 "WHERE slot_type = 'logical' AND "
1510 "temporary IS FALSE;");
1513 pg_fatal(
"could not count the number of logical replication slots");
1518 pg_fatal(
"Expected 0 logical replication slots but found %d.",
1524 "WHERE name IN ('wal_level', 'max_replication_slots') "
1525 "ORDER BY name DESC;");
1528 pg_fatal(
"could not determine parameter settings on new cluster");
1533 pg_fatal(
"wal_level must be \"logical\", but is set to \"%s\"",
1539 pg_fatal(
"max_replication_slots (%d) must be greater than or equal to the number of "
1540 "logical replication slots (%d) on the old cluster",
1571 if (nsubs_on_old == 0)
1574 prep_status(
"Checking for new cluster configuration for subscriptions");
1579 "WHERE name = 'max_replication_slots';");
1582 pg_fatal(
"could not determine parameter settings on new cluster");
1586 pg_fatal(
"max_replication_slots (%d) must be greater than or equal to the number of "
1587 "subscriptions (%d) on the old cluster",
1606 FILE *script = NULL;
1608 prep_status(
"Checking for valid logical replication slots");
1610 snprintf(output_path,
sizeof(output_path),
"%s/%s",
1612 "invalid_logical_slots.txt");
1618 for (
int slotnum = 0; slotnum < slot_arr->
nslots; slotnum++)
1625 if (script == NULL &&
1626 (script =
fopen_priv(output_path,
"w")) == NULL)
1627 pg_fatal(
"could not open file \"%s\": %m", output_path);
1629 fprintf(script,
"The slot \"%s\" is invalid\n",
1644 if (script == NULL &&
1645 (script =
fopen_priv(output_path,
"w")) == NULL)
1646 pg_fatal(
"could not open file \"%s\": %m", output_path);
1649 "The slot \"%s\" has not consumed the WAL yet\n",
1660 pg_fatal(
"Your installation contains logical replication slots that can't be upgraded.\n"
1661 "You can remove invalid slots and/or consume the pending WAL for other slots,\n"
1662 "and then restart the upgrade.\n"
1663 "A list of the problematic slots is in the file:\n"
1664 " %s", output_path);
1680 FILE *script = NULL;
1686 snprintf(output_path,
sizeof(output_path),
"%s/%s",
1688 "subs_invalid.txt");
1703 "SELECT d.datname, s.subname "
1704 "FROM pg_catalog.pg_subscription s "
1705 "LEFT OUTER JOIN pg_catalog.pg_replication_origin o "
1706 " ON o.roname = 'pg_' || s.oid "
1707 "INNER JOIN pg_catalog.pg_database d "
1708 " ON d.oid = s.subdbid "
1709 "WHERE o.roname iS NULL;");
1712 for (
int i = 0;
i < ntup;
i++)
1714 if (script == NULL && (script =
fopen_priv(output_path,
"w")) == NULL)
1715 pg_fatal(
"could not open file \"%s\": %m", output_path);
1716 fprintf(script,
"The replication origin is missing for database:\"%s\" subscription:\"%s\"\n",
1752 "SELECT r.srsubstate, s.subname, n.nspname, c.relname "
1753 "FROM pg_catalog.pg_subscription_rel r "
1754 "LEFT JOIN pg_catalog.pg_subscription s"
1755 " ON r.srsubid = s.oid "
1756 "LEFT JOIN pg_catalog.pg_class c"
1757 " ON r.srrelid = c.oid "
1758 "LEFT JOIN pg_catalog.pg_namespace n"
1759 " ON c.relnamespace = n.oid "
1760 "WHERE r.srsubstate NOT IN ('i', 'r') "
1761 "ORDER BY s.subname");
1764 for (
int i = 0;
i < ntup;
i++)
1766 if (script == NULL && (script =
fopen_priv(output_path,
"w")) == NULL)
1767 pg_fatal(
"could not open file \"%s\": %m", output_path);
1769 fprintf(script,
"The table sync state \"%s\" is not allowed for database:\"%s\" subscription:\"%s\" schema:\"%s\" relation:\"%s\"\n",
1785 pg_fatal(
"Your installation contains subscriptions without origin or having relations not in i (initialize) or r (ready) state.\n"
1786 "You can allow the initial sync to finish for all relations and then restart the upgrade.\n"
1787 "A list of the problematic subscriptions is in the file:\n"
1788 " %s", output_path);
void output_check_banner(bool live_check)
void check_cluster_versions(void)
static void check_for_tables_with_oids(ClusterInfo *cluster)
static void check_for_pg_role_prefix(ClusterInfo *cluster)
void check_cluster_compatibility(bool live_check)
static void check_new_cluster_logical_replication_slots(void)
static void check_old_cluster_subscription_state(void)
static void check_for_composite_data_type_usage(ClusterInfo *cluster)
void check_and_dump_old_cluster(bool live_check)
void issue_warnings_and_set_wal_level(void)
static char * fix_path_separator(char *path)
static void check_for_removed_data_type_usage(ClusterInfo *cluster, const char *version, const char *datatype)
static void check_old_cluster_for_valid_slots(bool live_check)
void check_new_cluster(void)
void report_clusters_compatible(void)
static void check_is_install_user(ClusterInfo *cluster)
static void check_new_cluster_subscription_configuration(void)
void create_script_for_old_cluster_deletion(char **deletion_script_file_name)
static void check_for_isn_and_int8_passing_mismatch(ClusterInfo *cluster)
static void check_new_cluster_is_empty(void)
static void check_for_user_defined_postfix_ops(ClusterInfo *cluster)
void output_completion_banner(char *deletion_script_file_name)
static void check_for_prepared_transactions(ClusterInfo *cluster)
static void check_proper_datallowconn(ClusterInfo *cluster)
static void check_for_new_tablespace_dir(void)
static void check_for_aclitem_data_type_usage(ClusterInfo *cluster)
static void check_for_user_defined_encoding_conversions(ClusterInfo *cluster)
static void check_for_jsonb_9_4_usage(ClusterInfo *cluster)
static void check_for_incompatible_polymorphics(ClusterInfo *cluster)
static void check_for_reg_data_type_usage(ClusterInfo *cluster)
void cluster(ParseState *pstate, ClusterStmt *stmt, bool isTopLevel)
void get_control_data(ClusterInfo *cluster, bool live_check)
void check_control_data(ControlData *oldctrl, ControlData *newctrl)
static void PGresult * res
void generate_old_dump(void)
void PQfinish(PGconn *conn)
int PQntuples(const PGresult *res)
char * PQgetvalue(const PGresult *res, int tup_num, int field_num)
int PQfnumber(const PGresult *res, const char *field_name)
char * pg_strdup(const char *in)
void check_file_clone(void)
void check_hard_link(void)
void check_copy_file_range(void)
void check_loadable_libraries(void)
void get_loadable_libraries(void)
int count_old_cluster_subscriptions(void)
void get_db_rel_and_slot_infos(ClusterInfo *cluster, bool live_check)
int count_old_cluster_logical_slots(void)
static void check_ok(void)
Assert(fmt[strlen(fmt) - 1] !='\n')
void pfree(void *pointer)
static pid_t start_postmaster(void)
void init_tablespaces(void)
bool check_for_data_types_usage(ClusterInfo *cluster, const char *base_query, const char *output_path)
void old_11_check_for_sql_identifier_data_type_usage(ClusterInfo *cluster)
bool check_for_data_type_usage(ClusterInfo *cluster, const char *type_name, const char *output_path)
void cleanup_output_dirs(void)
void report_extension_updates(ClusterInfo *cluster)
void void pg_log(eLogType type, const char *fmt,...) pg_attribute_printf(2
void old_9_3_check_for_line_data_type_usage(ClusterInfo *cluster)
@ TRANSFER_MODE_COPY_FILE_RANGE
void old_9_6_check_for_unknown_data_type_usage(ClusterInfo *cluster)
#define fopen_priv(path, mode)
PGconn * connectToServer(ClusterInfo *cluster, const char *db_name)
#define GET_MAJOR_VERSION(v)
void stop_postmaster(bool in_atexit)
void prep_status(const char *fmt,...) pg_attribute_printf(1
void old_9_6_invalidate_hash_indexes(ClusterInfo *cluster, bool check_mode)
#define JSONB_FORMAT_CHANGE_CAT_VER
PGresult * executeQueryOrDie(PGconn *conn, const char *fmt,...) pg_attribute_printf(2
bool path_is_prefix_of_path(const char *path1, const char *path2)
void canonicalize_path(char *path)
size_t strlcpy(char *dst, const char *src, size_t siz)
void initPQExpBuffer(PQExpBuffer str)
void appendPQExpBufferChar(PQExpBuffer str, char ch)
void appendPQExpBufferStr(PQExpBuffer str, const char *data)
void termPQExpBuffer(PQExpBuffer str)
char * psprintf(const char *fmt,...)
int max_replication_slots
void appendShellString(PQExpBuffer buf, const char *str)
const char * tablespace_suffix
bool float8_pass_by_value
LogicalSlotInfoArr slot_arr
transferMode transfer_mode