Skip to content

Commit b0984e6

Browse files
committed
Add a VACUUM command in hopes of making pg_upgrade usable again
in MVCC environment. I do not trust this until Vadim says it's OK...
1 parent b2a2be4 commit b0984e6

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/bin/pg_dump/pg_upgrade

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# pg_upgrade: update a database without needing a full dump/reload cycle.
44
# CAUTION: read the manual page before trying to use this!
55

6+
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/pg_upgrade,v 1.11 1999/08/02 22:34:53 tgl Exp $
7+
#
68
# NOTE: we must be sure to update the version-checking code a few dozen lines
79
# below for each new PostgreSQL release.
810

@@ -109,8 +111,15 @@ cat $INPUT | awk ' {
109111
;
110112
else print $0;
111113
}' >/tmp/$$
112-
113-
#create empty tables/indexes
114+
115+
# Add a VACUUM command to the end of the pg_dump script. With MVCC,
116+
# this is necessary to ensure that all the rows in the new database's
117+
# system tables will still be considered committed after we overwrite
118+
# pg_log with the old database's commit log...
119+
120+
echo "VACUUM;" >>/tmp/$$
121+
122+
# Create and vacuum empty tables/indexes
114123

115124
psql "template1" <"/tmp/$$"
116125

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy