> "Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
> > We only need to tell people to backup pg_control first. The rest was only
> > intended to enforce
> > 1. that pg_control is the first file backed up
> > 2. the dba uses a large enough PIT (or xid) for restore
>
> Right, but I think Bruce's point is that it is far too easy to get those
> things wrong; especially point 2 for which a straight tar dump will
> simply not contain the information you need to determine what is a safe
> stopping point.
>
> I agree with Bruce that we should have some mechanism that doesn't rely
> on the DBA to get this right. Exactly what the mechanism should be is
> certainly open for discussion...
Right. I am wondering what process people would use to backup
pg_control first? If they do:
tar -f $TAPE ./global/pg_control .
They will get two copies or pg_control, the early one, and one as part
of the directory scan. On restore, they would restore the early one,
but the directory scan would overwrite it. I suppose they could do:
cp global/pg_control global/pg_control.backuptar -f $TAPE .
then on restore once all the files are restored move the
pg_control.backup to its original name. That gives us the checkpoint
wal/offset but how do we get the start/stop information. Is that not
required? Maybe we should just have a start/stop server-side functions
that create a file in the archive directory describing the start/stop
counters and time and the admin would then have to find those values.
Why are the start/stop wal/offset values needed anyway? I know why we
need the checkpoint value. Do we need a checkpoint after the archiving
starts but before the backup begins?
Also, when you are in recovery mode, how do you get out of recovery
mode, meaning if you have a power failure, how do you prevent the system
from doing another recovery? Do you remove the recovery.conf file?
-- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610)
359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square,
Pennsylvania19073