Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit138c51b

Browse files
committed
Add missing binary-upgrade guard.
Commit9a974cb arranged forpg_dumpall to preserve tablespace OIDs, but it should only do thatin binary upgrade mode, not all the time.Reported by Christoph Berg.Discussion:http://postgr.es/m/YgjwrkEvNEqoz4Vm@msg.df7cb.de
1 parentf1ac4a7 commit138c51b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/bin/pg_dump/pg_dumpall.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,8 +1066,11 @@ dumpTablespaces(PGconn *conn)
10661066
/* needed for buildACLCommands() */
10671067
fspcname=pg_strdup(fmtId(spcname));
10681068

1069-
appendPQExpBufferStr(buf,"\n-- For binary upgrade, must preserve pg_tablespace oid\n");
1070-
appendPQExpBuffer(buf,"SELECT pg_catalog.binary_upgrade_set_next_pg_tablespace_oid('%u'::pg_catalog.oid);\n",spcoid);
1069+
if (binary_upgrade)
1070+
{
1071+
appendPQExpBufferStr(buf,"\n-- For binary upgrade, must preserve pg_tablespace oid\n");
1072+
appendPQExpBuffer(buf,"SELECT pg_catalog.binary_upgrade_set_next_pg_tablespace_oid('%u'::pg_catalog.oid);\n",spcoid);
1073+
}
10711074

10721075
appendPQExpBuffer(buf,"CREATE TABLESPACE %s",fspcname);
10731076
appendPQExpBuffer(buf," OWNER %s",fmtId(spcowner));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp