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

Commitc7bc5be

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 parent9dd5646 commitc7bc5be

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
@@ -1398,17 +1398,17 @@ dumpCreateDB(PGconn *conn)
13981398
appendStringLiteralConn(buf,dbname,conn);
13991399
appendPQExpBufferStr(buf,";\n");
14001400
}
1401+
}
14011402

1402-
if (binary_upgrade)
1403-
{
1404-
appendPQExpBufferStr(buf,"-- For binary upgrade, set datfrozenxid and datminmxid.\n");
1405-
appendPQExpBuffer(buf,"UPDATE pg_catalog.pg_database "
1406-
"SET datfrozenxid = '%u', datminmxid = '%u' "
1407-
"WHERE datname = ",
1408-
dbfrozenxid,dbminmxid);
1409-
appendStringLiteralConn(buf,dbname,conn);
1410-
appendPQExpBufferStr(buf,";\n");
1411-
}
1403+
if (binary_upgrade)
1404+
{
1405+
appendPQExpBufferStr(buf,"-- For binary upgrade, set datfrozenxid and datminmxid.\n");
1406+
appendPQExpBuffer(buf,"UPDATE pg_catalog.pg_database "
1407+
"SET datfrozenxid = '%u', datminmxid = '%u' "
1408+
"WHERE datname = ",
1409+
dbfrozenxid,dbminmxid);
1410+
appendStringLiteralConn(buf,dbname,conn);
1411+
appendPQExpBufferStr(buf,";\n");
14121412
}
14131413

14141414
if (!skip_acls&&

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp