Skip to content

Commit 44f5bb2

Browse files
committed
Use pg_dump's --quote-all-identifiers option in pg_upgrade.
This helps guard against changes in the set of reserved keywords from one version to another. In theory it should only be an issue if we de-reserve a keyword in a newer release, since that can create the type of problem shown in bug #8128. Back-patch to 9.1 where the --quote-all-identifiers option was added.
1 parent 3a33d56 commit 44f5bb2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/pg_upgrade/dump.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ generate_old_dump(void)
2424
* restores the frozenid's for databases and relations.
2525
*/
2626
exec_prog(UTILITY_LOG_FILE, NULL, true,
27-
"\"%s/pg_dumpall\" %s --schema-only --binary-upgrade %s -f %s",
27+
"\"%s/pg_dumpall\" %s --schema-only --quote-all-identifiers "
28+
"--binary-upgrade %s -f %s",
2829
new_cluster.bindir, cluster_conn_opts(&old_cluster),
2930
log_opts.verbose ? "--verbose" : "",
3031
ALL_DUMP_FILE);

0 commit comments

Comments
 (0)