> > Yes. But I think you might have to avoid "vacuum full" during data file backup.
> 
> Why?  If vacuum is unsafe in this scenario, wouldn't it also be unsafe
> in event of a system crash?

I was not sure we are 100% crash safe during "vacuum full".
But yes, now recalling your last remark on a crash during vacuum full
I guess we should be.

> I do believe that vacuum should (but presently does not) emit a WAL
> record showing its truncation of the file, so that the equivalent
> truncation can be repeated during replay.

> However, this is needed in any case.

I see, but it has only the effect of not freeing the space to the OS, 
so it is not really a bug ? Next vacuum will do it anyway. 

Andreas

Fri, 22 Feb 2002 17:06:33 +0100
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>
Re: point in time recovery and moving datafiles online 
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
>> I do believe that vacuum should (but presently does not) emit a WAL
>> record showing its truncation of the file, so that the equivalent
>> truncation can be repeated during replay.

> I see, but it has only the effect of not freeing the space to the OS, 
> so it is not really a bug ? Next vacuum will do it anyway. 

[ thinks... ]  Yeah, you're probably right.  The extra pages should
contain only dead tuples (either already dead or moved-off by vacuum),
so a seqscan would find no live data in them anyway.  It should be
fixed, but it's not critical (except possibly for people who are low
on disk space...)

			regards, tom lane

Fri, 22 Feb 2002 11:14:24 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: point in time recovery and moving datafiles online 
Zeugswetter Andreas SB SD wrote:
> > > Yes. But I think you might have to avoid "vacuum full" during data file backup.
> > 
> > Why?  If vacuum is unsafe in this scenario, wouldn't it also be unsafe
> > in event of a system crash?
> 
> I was not sure we are 100% crash safe during "vacuum full".
> But yes, now recalling your last remark on a crash during vacuum full
> I guess we should be.
> 
> > I do believe that vacuum should (but presently does not) emit a WAL
> > record showing its truncation of the file, so that the equivalent
> > truncation can be repeated during replay.
> 
> > However, this is needed in any case.
> 
> I see, but it has only the effect of not freeing the space to the OS, 
> so it is not really a bug ? Next vacuum will do it anyway. 

One idea is that replication can give is point-in-time recovery.  A
recovery is nothing more than a replication slave taking the last full
backup and reading the replication traffic to get itself up to date.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Fri, 22 Feb 2002 13:30:07 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: point in time recovery and moving datafiles online