
> > To clarify:
> > I'd expect a cluster to be workable, if I
> > - disable VACUUM until backup completed
> > - issue CHECKPOINT
> > - backup clog (CHECKPOINT and backup clog are the "backup checkpoint")
> > - backup all datafiles (which include at least all completed transaction 
> > data at checkpoint time)
> > and then
> > - restore datafiles and clog
> > - bring up pgsql.
> 
> Why is that a useful approach?  You might as well shut down the
> postmaster and do a cold filesystem backup, because you are depending on
> the data files (including clog) not to change after the checkpoint.  You
> cannot make such an assumption in a running database.

I think there is a misunderstanding here. 

What I think is possible is the following (continuous backup of WAL assumed):
- disable VACUUM
- issue CHECKPOINT "C1"
- backup all files
- reenable VACUUM

- restore files
- adapt pg_control (checkpoint "C1")
- recover WAL until at least end of backup

The db is inconsistent until you recovered all WAL (PITR) that accumulated during
file backup. 

I am not sure about clog, isn't clog logged in xlog ?

Andreas

Wed, 10 Mar 2004 19:58:04 +0100
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>
Re: PITR Functional Design v2 for 7.5
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
> What I think is possible is the following (continuous backup of WAL assumed):
> - disable VACUUM
> - issue CHECKPOINT "C1"
> - backup all files
> - reenable VACUUM

> - restore files
> - adapt pg_control (checkpoint "C1")
> - recover WAL until at least end of backup

I do not understand this fixation on "disable VACUUM".  What are you
thinking that will buy you?  AFAICS it would make no difference.

> I am not sure about clog, isn't clog logged in xlog ?

Right.  For the purposes of PITR, clog behaves the same as regular
data files.  You gotta back it up, but a filesystem copy will be
inconsistent until fixed by WAL replay.

			regards, tom lane

Thu, 11 Mar 2004 01:57:39 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: PITR Functional Design v2 for 7.5 