mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
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...
This commit is contained in:
@ -3,6 +3,8 @@
|
|||||||
# pg_upgrade: update a database without needing a full dump/reload cycle.
|
# pg_upgrade: update a database without needing a full dump/reload cycle.
|
||||||
# CAUTION: read the manual page before trying to use this!
|
# 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
|
# NOTE: we must be sure to update the version-checking code a few dozen lines
|
||||||
# below for each new PostgreSQL release.
|
# below for each new PostgreSQL release.
|
||||||
|
|
||||||
@ -109,8 +111,15 @@ cat $INPUT | awk ' {
|
|||||||
;
|
;
|
||||||
else print $0;
|
else print $0;
|
||||||
}' >/tmp/$$
|
}' >/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/$$"
|
psql "template1" <"/tmp/$$"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user