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

From Fujii Masao
Subject Re: Clean shutdown and warm standby
Date
Msg-id 3f0b79eb0904082000i580e88cep8211e62c969cd10a@mail.gmail.com
Whole thread Raw
In response to Clean shutdown and warm standby  (Guillaume Smet <guillaume.smet@gmail.com>)
Responses Re: Clean shutdown and warm standby  (Guillaume Smet <guillaume.smet@gmail.com>)
List pgsql-hackers
Hi,

On Thu, Apr 9, 2009 at 4:11 AM, Guillaume Smet <guillaume.smet@gmail.com> wrote:
> Hi,
>
> 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
> so that the archive command is also executed for this file and we are
> sure we have all the useful XLog files when we perform a clean
> shutdown of master + switch to the failover server. This rotation is
> done only if the archive mode is active and an archive command is set.
>
> It's currently really difficult to switch easily (ie without copying
> the file manually) to the failover server without any data loss.
>
> Is there any problem I've missed?

RequestXLogSwitch() doesn't wait until the switched WAL file has
actually been archived. So, some WAL files still may not exist in
the standby server also after clean shutdown of the primary.

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


pgsql-hackers by date:

Previous
From: Itagaki Takahiro
Date:
Subject: Re: Solution of the file name problem of copy on windows.
Next
From: Guillaume Smet
Date:
Subject: Re: Clean shutdown and warm standby