From: Simon Riggs <simon@2ndquadrant.com>
To: Gaetano Mendola <mendola@bigfoot.com>
Cc: Robert Treat <xzilla@users.sourceforge.net>
Cc: pgsql-admin@postgresql.org
Cc: iain@mst.co.jp
Subject: Re: replication using WAL archives
Date: Fri, 22 Oct 2004 18:29:10 +0100
Message-ID: <1098466150.20926.13.camel@localhost.localdomain> (raw)
In-Reply-To: <4179390B.10700@bigfoot.com>
References: <002801c4b739$68450870$7201a8c0@mst1x5r347kymb>
<1098384082.15573.14.camel@camel>
<41782EEF.5040708@bigfoot.com>
<011a01c4b818$b7370a20$06e887d9@Nightingale>
<4179390B.10700@bigfoot.com>
On Fri, 2004-10-22 at 17:44, Gaetano Mendola wrote:
> | Gaetano - skim-reading your script, how do you handle the situation when a
> | new xlog file has been written within 10 seconds? That way the current file
> | number will have jumped by 2, so when your script looks for the "Last wal"
> | using head -1 it will find the N+2 and the intermediate file will never be
> | copied. Looks like a problem to me...
>
>
> Yes, the only window failure I seen ( but I don't know if it's possible )
>
> Master:
> ~ log N created
> log N filled
> archive log N
> log N+1 created
> log N+1 filled
> ~ log N+2 created
> ~ <---- the master die here before to archive the log N+1
> ~ archive log N+1
>
>
> in this case as you underline tha last log archived is the N and the N+2
> partial wal is added to archived wal collection and in the recovery fase
> the recovery stop after processing the log N.
>
> Is it possible that the postmaster create the N+2 file without finish to archive
> the N+1 ? ( I suspect yes :-( )
>
> The only cure I see here is to look for not archived WAL ( if possible ).
>
Hmm...well you aren't looking for archived wal, you're just looking at
wal...which is a different thing...
Situation I thought I saw was:
- copy away current partial filled xlog N
- xlog N fills, N+1 starts
- xlog N+1 fills, N+2 starts
- copy away current partial filled xlog: N+2 (+10 secs later)
i.e. if time to fill xlog (is ever) < time to copy away current xlog,
then you miss one.
So problem: you can miss one and never know you've missed one until the
recovery can't find it, which it never returns from...so it just hangs.
[Just so we're all clear: we're talking about Gaetano's script, not the
PostgreSQL archver. The postgresql archiver doesn't do it that way, so
it never misses one.]
--
Best Regards, Simon Riggs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: simon@2ndquadrant.com, mendola@bigfoot.com, xzilla@users.sourceforge.net, iain@mst.co.jp
Subject: Re: replication using WAL archives
In-Reply-To: <1098466150.20926.13.camel@localhost.localdomain>
References: <002801c4b739$68450870$7201a8c0@mst1x5r347kymb> <1098384082.15573.14.camel@camel> <41782EEF.5040708@bigfoot.com> <011a01c4b818$b7370a20$06e887d9@Nightingale> <4179390B.10700@bigfoot.com> <1098466150.20926.13.camel@localhost.localdomain>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox