Skip to content

Commit 56ac625

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 6f3ec22 commit 56ac625

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
@@ -22,7 +22,8 @@ generate_old_dump(void)
2222
*/
2323
exec_prog(true,
2424
SYSTEMQUOTE "\"%s/pg_dumpall\" --port %d --username \"%s\" "
25-
"--schema-only --binary-upgrade -f \"%s/" ALL_DUMP_FILE "\""
25+
"--schema-only --quote-all-identifiers --binary-upgrade "
26+
"-f \"%s/" ALL_DUMP_FILE "\""
2627
SYSTEMQUOTE, new_cluster.bindir, old_cluster.port, os_info.user, os_info.cwd);
2728
check_ok();
2829
}

0 commit comments

Comments
 (0)