Re: Clean shutdown and warm standby - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Clean shutdown and warm standby
Date
Msg-id 49F15A19.4040804@enterprisedb.com
Whole thread Raw
In response to Re: Clean shutdown and warm standby  (Guillaume Smet <guillaume.smet@gmail.com>)
Responses Re: Clean shutdown and warm standby
List pgsql-hackers
Guillaume Smet wrote:
> On Wed, Apr 8, 2009 at 9:11 PM, I wrote:
>> Following the discussion here
>> http://archives.postgresql.org/message-id/49D9E986.8010604@pse-consulting.de
>> , I wrote a small patch which rotates the last XLog file on shutdown
>> [snip]
> 
> Any comment or advice on how I can fix it with a different method if
> this one is considered wrong?
> 
> Original message and patch here:
> http://archives.postgresql.org/message-id/1d4e0c10904081211p2c0f1cdepe620c11d1271ceb2@mail.gmail.com

Sorry for the delay.

It's not safe to write WAL after the checkpoint, as RequestXLogSwitch() 
does. After restart, the system will start inserting WAL from the 
checkpoint redo point, which is just before the XLOG_SWITCH record, and 
will overwrite it.

It would be nice to have all WAL archived at shutdown, but this is not 
the way to do it :-(.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Zdenek Kotala
Date:
Subject: Re: cs_CZ vs regression tests, part N+1
Next
From: Zdenek Kotala
Date:
Subject: Re: cs_CZ vs regression tests, part N+1