Content-Length: 293035 | pFad | http://github.com/postgrespro/postgres/commit/55179b03ea05af8d05adfe53657e1f1b742d7ceb

BE pg_upgrade: preserve freeze info for postgres/template1 dbs · postgrespro/postgres@55179b0 · GitHub
Skip to content

Commit 55179b0

Browse files
committed
pg_upgrade: preserve freeze info for postgres/template1 dbs
pg_database.datfrozenxid and pg_database.datminmxid were not preserved for the 'postgres' and 'template1' databases. This could cause missing clog file errors on access to user tables and indexes after upgrades in these databases. Backpatch through 9.0
1 parent 32e6331 commit 55179b0

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
@@ -1325,17 +1325,17 @@ dumpCreateDB(PGconn *conn)
13251325
appendStringLiteralConn(buf, dbname, conn);
13261326
appendPQExpBuffer(buf, ";\n");
13271327
}
1328+
}
13281329

1329-
if (binary_upgrade)
1330-
{
1331-
appendPQExpBuffer(buf, "-- For binary upgrade, set datfrozenxid.\n");
1332-
appendPQExpBuffer(buf, "UPDATE pg_catalog.pg_database "
1333-
"SET datfrozenxid = '%u' "
1334-
"WHERE datname = ",
1335-
dbfrozenxid);
1336-
appendStringLiteralConn(buf, dbname, conn);
1337-
appendPQExpBuffer(buf, ";\n");
1338-
}
1330+
if (binary_upgrade)
1331+
{
1332+
appendPQExpBuffer(buf, "-- For binary upgrade, set datfrozenxid.\n");
1333+
appendPQExpBuffer(buf, "UPDATE pg_catalog.pg_database "
1334+
"SET datfrozenxid = '%u' "
1335+
"WHERE datname = ",
1336+
dbfrozenxid);
1337+
appendStringLiteralConn(buf, dbname, conn);
1338+
appendPQExpBuffer(buf, ";\n");
13391339
}
13401340

13411341
if (!skip_acls &&

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/55179b03ea05af8d05adfe53657e1f1b742d7ceb

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy