postgres.git / summary / log / commit / refs

commit    55179b03ea05af8d05adfe53657e1f1b742d7ceb
Author:   Bruce Momjian <bruce@momjian.us>
Date:     Thu Feb 12 02:02:07 2015 +0000
First released in: 9.5.0, 9.0.20, 9.1.16, 9.2.11, 9.3.7, 9.4.2

    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


src/bin/pg_dump/pg_dumpall.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c index 8548ff9c85b..cb744f5ab33 100644 --- a/src/bin/pg_dump/pg_dumpall.c +++ b/src/bin/pg_dump/pg_dumpall.c @@ -1325,17 +1325,17 @@ dumpCreateDB(PGconn *conn) appendStringLiteralConn(buf, dbname, conn); appendPQExpBuffer(buf, ";\n"); } + } - if (binary_upgrade) - { - appendPQExpBuffer(buf, "-- For binary upgrade, set datfrozenxid.\n"); - appendPQExpBuffer(buf, "UPDATE pg_catalog.pg_database " - "SET datfrozenxid = '%u' " - "WHERE datname = ", - dbfrozenxid); - appendStringLiteralConn(buf, dbname, conn); - appendPQExpBuffer(buf, ";\n"); - } + if (binary_upgrade) + { + appendPQExpBuffer(buf, "-- For binary upgrade, set datfrozenxid.\n"); + appendPQExpBuffer(buf, "UPDATE pg_catalog.pg_database " + "SET datfrozenxid = '%u' " + "WHERE datname = ", + dbfrozenxid); + appendStringLiteralConn(buf, dbname, conn); + appendPQExpBuffer(buf, ";\n"); } if (!skip_acls && [parent: 32e633195839]