Re: Clean shutdown and warm standby

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Clean shutdown and warm standby
Date: 2009-04-24 06:20:09
Message-ID: 49F15A19.4040804@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message K, Niranjan (NSN - IN/Bangalore) 2009-04-24 06:54:51 Synchronous replication: psqlODBC driver compilation
Previous Message Zdenek Kotala 2009-04-24 05:48:18 Re: cs_CZ vs regression tests, part N+1