
> > I was wondering about this point - might it not be just as reasonable 
> > for the copied file to *be* an exact image of pg_control?  Then a very 
> > simple variant of pg_controldata (or maybe even just adding switches to 
> > pg_controldata itself) would enable the relevant info to be extracted
> 
> We didn't do that so admins could easily read the file contents.

If you use a readable file you will also need a feature for restore (or a tool) 
to create an appropriate pg_control file, or are you intending to still require
that pg_control be the first file backed up. 
Another possibility would be that the start function writes the readable file and
also copies pg_control.

Andreas

Fri, 30 Jul 2004 09:57:26 +0200
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>
Re: Point in Time Recovery
Zeugswetter Andreas SB SD wrote:
> 
> > > I was wondering about this point - might it not be just as reasonable 
> > > for the copied file to *be* an exact image of pg_control?  Then a very 
> > > simple variant of pg_controldata (or maybe even just adding switches to 
> > > pg_controldata itself) would enable the relevant info to be extracted
> > 
> > We didn't do that so admins could easily read the file contents.
> 
> If you use a readable file you will also need a feature for restore (or a tool) 
> to create an appropriate pg_control file, or are you intending to still require
> that pg_control be the first file backed up. 
> Another possibility would be that the start function writes the readable file and
> also copies pg_control.

We will back up pg_control in the tar file but it doesn't have to have
all correct information. The WAL replay will set it properly I think. 
In fact it has to start recovery checkpoint settings, not the backup
setting at all.

-- 
  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, Pennsylvania 19073

Fri, 30 Jul 2004 12:12:18 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: Point in Time Recovery
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
> If you use a readable file you will also need a feature for restore
> (or a tool) to create an appropriate pg_control file, or are you
> intending to still require that pg_control be the first file backed
> up.

No, the entire point of this exercise is to get rid of that assumption.
You do need *a* copy of pg_control, but the only reason you'd need to
back it up first rather than later is so that its checkpoint pointer
points to the last checkpoint before the dump starts.  Which is the
information we want to put in the archive-label file insted.

If a copy of pg_control were sufficient then I'd be all for using it as
the archive-label file, but it's *not* sufficient because you also need
the ending WAL offset.  So we need a different file layout in any case,
and we may as well take some pity on the poor DBA and make the file
easily human-readable.

			regards, tom lane

Fri, 30 Jul 2004 13:04:46 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Point in Time Recovery 
Ok - that is a much better way of doing it!

regards

Mark

Tom Lane wrote:

>"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
>  
>
>>If you use a readable file you will also need a feature for restore
>>(or a tool) to create an appropriate pg_control file, or are you
>>intending to still require that pg_control be the first file backed
>>up.
>>    
>>
>
>No, the entire point of this exercise is to get rid of that assumption.
>You do need *a* copy of pg_control, but the only reason you'd need to
>back it up first rather than later is so that its checkpoint pointer
>points to the last checkpoint before the dump starts.  Which is the
>information we want to put in the archive-label file insted.
>
>If a copy of pg_control were sufficient then I'd be all for using it as
>the archive-label file, but it's *not* sufficient because you also need
>the ending WAL offset.  So we need a different file layout in any case,
>and we may as well take some pity on the poor DBA and make the file
>easily human-readable.
>
>			regards, tom lane
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>      subscribe-nomail command to majordomo@postgresql.org so that your
>      message can get through to the mailing list cleanly
>  
>

Sat, 31 Jul 2004 12:39:01 +1200
Mark Kirkwood <markir@coretech.co.nz>
Re: Point in Time Recovery