Re: Resurrecting pg_upgrade - Mailing list pgsql-hackers

From Sander Steffann
Subject Re: Resurrecting pg_upgrade
Date
Msg-id 2B1A983EDCEC3447B22632B64F7264600B73B9@bill.office.computel.nl
Whole thread Raw
In response to Re: Resurrecting pg_upgrade  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

> Alternative thought: just recommend that if possible, people 
> take a filesystem dump of their old PGDATA directory after 
> stopping the old postmaster.  This would be sufficient for 
> retreating to the prior version if needed.  It might or might 
> not be slower than copying all the files to a new PGDATA ...

Filesystem-level snapshots make this very easy. Combined with:

Dave Smith <dave.smith@candata.com> writes:
> Why not go the other way.
> 1) Dump the schemas.
> 2) Initdb with the new schemas in a tmp PGDATA
> 3) backup the schemas in the current PGDATA
> 4) move the new schemas from the new db into the current one.

Then it would be possible to:
1) Stop old postmaster
2) Make a filesystem snapshot
3) Upgrade the schemas in-place (as described above)
4) Start new postmaster
*) On error: revert filesystem to snapshot

Would be very nice for those who can use filesystem snapshots.
Sander.



pgsql-hackers by date:

Previous
From: "Peter Eisentraut"
Date:
Subject: Re: 7.4 include file conflict
Next
From: "Magnus Hagander"
Date:
Subject: Re: [PATCHES] fork/exec patch