1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Preserver pg_log and pg_variable in upgrade. Cleanups.

This commit is contained in:
Bruce Momjian
1998-08-31 04:32:18 +00:00
parent a753e5d192
commit 2913d6557e
2 changed files with 24 additions and 32 deletions

View File

@ -1,12 +1,12 @@
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/pg_upgrade.1,v 1.3 1998/08/30 13:14:00 momjian Exp $
.\" $Header: /cvsroot/pgsql/src/man/Attic/pg_upgrade.1,v 1.4 1998/08/31 04:32:18 momjian Exp $
.TH pg_upgrade UNIX 1/20/96 PostgreSQL PostgreSQL
.SH NAME
pg_upgrade - allows upgrade from a previous release without reloading data
.SH SYNOPSIS
.BR pg_upgrade
[-f input_file] old_data_dir database
[-f input_file] old_data_dir
.SH DESCRIPTION
.IR "pg_upgrade"
is a utility for upgrading from a previous PostgreSQL release
@ -15,27 +15,28 @@ First, to be safe, back up your data directory.
Then, use:
.nf
pg_dumpall -s -o >db.out
pg_dumpall -s >db.out
.fi
to dump out your old database definitions without data,
while perserving the max system oid.
to dump out your old database definitions without any data.
Stop the postmaster and all backends.
.PP
Then rename (using
.IR mv )
your old pgsql /data directory to /data.old and do a
.IR "make install"
to install the new binaries.
Then run
Run
.IR initdb
to create a new
.IR template1
database containing the system tables for the new release.
Start the new postmaster,
.IR cd
to the pgsql main directory, and type:
.nf
pg_upgrade -f db.out data.old template1
pg_upgrade -f db.out data.old
.fi
The system will do some checking to make sure everything is properly
@ -45,13 +46,9 @@ script to create all the databases and tables you had, but with no data.
It will then move the data files from /data.old into the proper
.IR /data
directory.
You can then start the
.IR postmaster
and check out the data.
You can then check out the data.
You can delete the
.IR /data.old
directory when you are finished.
.PP
It can also be used for individual databases.
.SH "SEE ALSO"
pg_dumpall(1).