Re: PITR, checkpoint, and local relations

From: Richard Tucker <richt(at)multera(dot)com>
To: "Mikheev, Vadim" <vmikheev(at)SECTORBASE(dot)COM>, "J(dot) R(dot) Nield" <jrnield(at)usol(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL Hacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PITR, checkpoint, and local relations
Date: 2002-08-07 15:01:59
Message-ID: EKEKLEKKLDAEEKDBDMMAMEJGCDAA.richt@multera.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> -----Original Message-----
> From: Mikheev, Vadim [mailto:vmikheev(at)SECTORBASE(dot)COM]
> Sent: Friday, August 02, 2002 7:51 PM
> To: 'richt(at)multera(dot)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
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-08-07 15:05:54 Re: moving FE->BE encoding conversion
Previous Message Tatsuo Ishii 2002-08-07 15:00:53 Re: Off-topic: FUNC_MAX_ARGS benchmarks