|
3 | 3 | # pg_upgrade: update a database without needing a full dump/reload cycle.
|
4 | 4 | # CAUTION: read the manual page before trying to use this!
|
5 | 5 |
|
| 6 | +# $Header: /cvsroot/pgsql/src/bin/pg_dump/Attic/pg_upgrade,v 1.11 1999/08/02 22:34:53 tgl Exp $ |
| 7 | +# |
6 | 8 | # NOTE: we must be sure to update the version-checking code a few dozen lines
|
7 | 9 | # below for each new PostgreSQL release.
|
8 | 10 |
|
@@ -109,8 +111,15 @@ cat $INPUT | awk '{
|
109 | 111 | ;
|
110 | 112 | elseprint $0;
|
111 | 113 | }'>/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 |
114 | 123 |
|
115 | 124 | psql"template1"<"/tmp/$$"
|
116 | 125 |
|
|