Re: Clean shutdown and warm standby

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Guillaume Smet <guillaume(dot)smet(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Subject: Re: Clean shutdown and warm standby
Date: 2009-04-09 03:00:32
Message-ID: 3f0b79eb0904082000i580e88cep8211e62c969cd10a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Thu, Apr 9, 2009 at 4:11 AM, Guillaume Smet <guillaume(dot)smet(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Guillaume Smet 2009-04-09 09:36:23 Re: Clean shutdown and warm standby
Previous Message Itagaki Takahiro 2009-04-09 00:22:58 Re: Solution of the file name problem of copy on windows.