> So I think what will work then is pg_copy (hot backup) would:
> 1) Issue an ALTER SYSTEM BEGIN BACKUP command which turns on 
> atomic write,
> checkpoints the database and disables further checkpoints (so 
> wal files
> won't be reused) until the backup is complete.
> 2) Change ALTER SYSTEM BACKUP DATABASE TO <directory> read 
> the database
> directory to find which files it should backup rather than 
> pg_class and for
> each file just use system(cp...) to copy it to the backup directory.

Did you consider saving backup on the client host (ie from where
pg_copy started)?

> 3) ALTER SYSTEM FINISH BACKUP does at it does now and backs 
> up the pg_xlog
> directory and renables database checkpointing.

Well, wouldn't be single command ALTER SYSTEM BACKUP enough?
What's the point to have 3 commands?

(If all of this is already discussed then sorry - I'm not going
to start new discussion).

Vadim

Fri, 2 Aug 2002 16:50:31 -0700 
"Mikheev, Vadim" <vmikheev@SECTORBASE.COM>
Re: PITR, checkpoint, and local relations


> -----Original Message-----
> From: Mikheev, Vadim [mailto:vmikheev@SECTORBASE.COM]
> Sent: Friday, August 02, 2002 7:51 PM
> To: 'richt@multera.com'; J. R. Nield
> Cc: Tom Lane; Bruce Momjian; PostgreSQL Hacker
> Subject: RE: [HACKERS] PITR, checkpoint, and local relations
>
>
> > So I think what will work then is pg_copy (hot backup) would:
> > 1) Issue an ALTER SYSTEM BEGIN BACKUP command which turns on
> > atomic write,
> > checkpoints the database and disables further checkpoints (so
> > wal files
> > won't be reused) until the backup is complete.
> > 2) Change ALTER SYSTEM BACKUP DATABASE TO <directory> read
> > the database
> > directory to find which files it should backup rather than
> > pg_class and for
> > each file just use system(cp...) to copy it to the backup directory.
>
> Did you consider saving backup on the client host (ie from where
> pg_copy started)?
No, pg_copy just uses the libpq interface.
>
> > 3) ALTER SYSTEM FINISH BACKUP does at it does now and backs
> > up the pg_xlog
> > directory and renables database checkpointing.
>
I think now it could be just one command.  My implementation was reading
pg_class to find the tables and indexes that needed backing up.  Now reading
pg_database would be sufficient to find the directories containing files
that needed to be archived, so it could all be done in one command.

> Well, wouldn't be single command ALTER SYSTEM BACKUP enough?
> What's the point to have 3 commands?
>
> (If all of this is already discussed then sorry - I'm not going
> to start new discussion).
>
> Vadim
>


Wed, 07 Aug 2002 11:01:59 -0400
Richard Tucker <richt@multera.com>
Re: PITR, checkpoint, and local relations