Thread
-
Re: PITR, checkpoint, and local relations
Vadim Mikheev <vmikheev@sectorbase.com> — 2002-08-02T23:50:31Z
> 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
-
Re: PITR, checkpoint, and local relations
Richard Tucker <richt@multera.com> — 2002-08-07T15:01:59Z
> -----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 >