Skip site navigation (1) Skip section navigation (2)

Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL
Date: 2010-02-10 09:19:01
Message-ID: 3f0b79eb1002100119r6ce1b4b7haf2732d5fa8bbfa1@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-docspgsql-hackers
On Wed, Feb 10, 2010 at 4:32 PM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> Hmm, so after running restore_command, check the file size and if it's
> too short, treat it the same as if restore_command returned non-zero?

Yes, only in standby mode case. OTOH I think that normal archive recovery
should treat it as a FATAL error.

> And it will be retried on the next iteration. Works for me, though OTOH
> it will then fail to complain about a genuinely WAL file that's
> truncated for some reason. I guess there's no way around that, even if
> you have a script as restore_command that does the file size check, it
> will have the same problem.

Right. But the server in standby mode also needs to complain about that?
We might be able to read completely such a WAL file that looks truncated
from the primary via SR, or from the archive after a few seconds. So it's
odd for me to give up continuing the standby only by finding the WAL file
whose file size is short. I believe that the warm standby (+ pg_standby)
also is based on that thought.

Regards,

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

In response to

pgsql-docs by date

Next:From: Aidan Van DykDate: 2010-02-10 13:45:00
Subject: Re: Re: [COMMITTERS] pgsql: Make standby servercontinuously retry restoring the next WAL
Previous:From: Heikki LinnakangasDate: 2010-02-10 07:32:48
Subject: Re: [COMMITTERS] pgsql: Make standby server continuously retry restoring the next WAL

pgsql-hackers by date

Next:From: Kurt HarrimanDate: 2010-02-10 09:26:56
Subject: Re: Patch: Remove gcc dependency in definition of inline functions
Previous:From: Leonardo FDate: 2010-02-10 09:11:40
Subject: Re: I: About "Our CLUSTER implementation is pessimal" patch

pgsql-committers by date

Next:From: Aidan Van DykDate: 2010-02-10 13:45:00
Subject: Re: Re: [COMMITTERS] pgsql: Make standby servercontinuously retry restoring the next WAL
Previous:From: Heikki LinnakangasDate: 2010-02-10 08:25:25
Subject: pgsql: Now that streaming replication switches between streaming mode

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group