aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1999-08-02 22:34:53 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1999-08-02 22:34:53 +0000
commitb0984e699505034d7f55c4a0be4a3cf3722b2cd0 (patch)
tree8876a668667e052129aafcba0b96e0c723f0de0a /src
parentb2a2be4c5ac9896af55ff367e0863d3a65fc2277 (diff)
downloadpostgresql-b0984e699505034d7f55c4a0be4a3cf3722b2cd0.tar.gz
postgresql-b0984e699505034d7f55c4a0be4a3cf3722b2cd0.zip
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...
Diffstat (limited to 'src')
-rwxr-xr-xsrc/bin/pg_dump/pg_upgrade13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_upgrade b/src/bin/pg_dump/pg_upgrade
index ef88b0eb185..c58b2b0ad87 100755
--- a/src/bin/pg_dump/pg_upgrade
+++ b/src/bin/pg_dump/pg_upgrade
@@ -3,6 +3,8 @@
# pg_upgrade: update a database without needing a full dump/reload cycle.
# CAUTION: read the manual page before trying to use this!
+# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/pg_upgrade,v 1.11 1999/08/02 22:34:53 tgl Exp $
+#
# NOTE: we must be sure to update the version-checking code a few dozen lines
# below for each new PostgreSQL release.
@@ -109,8 +111,15 @@ cat $INPUT | awk ' {
;
else print $0;
}' >/tmp/$$
-
-#create empty tables/indexes
+
+# Add a VACUUM command to the end of the pg_dump script. With MVCC,
+# this is necessary to ensure that all the rows in the new database's
+# system tables will still be considered committed after we overwrite
+# pg_log with the old database's commit log...
+
+echo "VACUUM;" >>/tmp/$$
+
+# Create and vacuum empty tables/indexes
psql "template1" <"/tmp/$$"