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

Commit866f301

Browse files
committed
pg_upgrade: preserve freeze info for postgres/template1 dbs
pg_database.datfrozenxid and pg_database.datminmxid were not preservedfor the 'postgres' and 'template1' databases. This could cause missingclog file errors on access to user tables and indexes after upgrades inthese databases.Backpatch through 9.0
1 parent8785e6e commit866f301

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

‎src/bin/pg_dump/pg_dumpall.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,17 +1416,17 @@ dumpCreateDB(PGconn *conn)
14161416
dbconnlimit);
14171417

14181418
appendPQExpBufferStr(buf,";\n");
1419+
}
14191420

1420-
if (binary_upgrade)
1421-
{
1422-
appendPQExpBufferStr(buf,"-- For binary upgrade, set datfrozenxid and datminmxid.\n");
1423-
appendPQExpBuffer(buf,"UPDATE pg_catalog.pg_database "
1424-
"SET datfrozenxid = '%u', datminmxid = '%u' "
1425-
"WHERE datname = ",
1426-
dbfrozenxid,dbminmxid);
1427-
appendStringLiteralConn(buf,dbname,conn);
1428-
appendPQExpBufferStr(buf,";\n");
1429-
}
1421+
if (binary_upgrade)
1422+
{
1423+
appendPQExpBufferStr(buf,"-- For binary upgrade, set datfrozenxid and datminmxid.\n");
1424+
appendPQExpBuffer(buf,"UPDATE pg_catalog.pg_database "
1425+
"SET datfrozenxid = '%u', datminmxid = '%u' "
1426+
"WHERE datname = ",
1427+
dbfrozenxid,dbminmxid);
1428+
appendStringLiteralConn(buf,dbname,conn);
1429+
appendPQExpBufferStr(buf,";\n");
14301430
}
14311431

14321432
if (!skip_acls&&

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp