Re: Enforcing that all WAL has been replayed after restoring from backup

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Enforcing that all WAL has been replayed after restoring from backup
Date: 2011-08-10 18:16:47
Message-ID: CABUevEwGL+gpZuuaUuMUh+Hvpd=ps-2NmQM9Jj+dWaao82sNJQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 10, 2011 at 19:45, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
>> Hmm, that's not possible for the 'tar' output, but would work for 'dir'
>> output. Another similar idea would be to withhold the control file in
>> memory until the end of backup, and append it to the output as last. The
>> backup can't be restored until the control file is written out.
>
>> That won't protect from more complicated scenarios, like if you take the
>> backup without the -x flag, and copy some but not all of the required
>> WAL files manually to the pg_xlog directory. But it'd be much better
>> than nothing for 9.1.
>
> Maybe we're overcomplicating this.  What about changing pg_basebackup to
> print a message when the backup is completely sent/received?  People
> would get used to that quickly, and would know to be suspicious if they
> didn't see it.

That would suck for scripts, and have people redirect the output to
/dev/null instead, wouldn't it? And it violates the "unix expectation"
that is that a successful command will not write anything to it's
output...

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-08-10 18:19:44 Re: sha1, sha2 functions into core?
Previous Message Tom Lane 2011-08-10 18:12:49 Re: SHOW command always returns text field