pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gaetano Mendola <mendola@bigfoot.com>
To: Simon Riggs <simon@2ndquadrant.com>
Subject: Re: replication using WAL archives
Date: Fri, 22 Oct 2004 22:50:34 +0200
Message-ID: <4179729A.5020401@bigfoot.com> (raw)
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>

Simon Riggs wrote:

 > 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.

No. The restore.sh is not smart enough to know the last wal that must be
replayed, the only "smart thing" is to copy the supposed "current wal" in the
archive directory.

The script hang (and is a feature not a bug) if and only if the master is alive
( at least I'm not seeing any other hang ).

In your example in the archived directory will be present the files until logN
and logN+2 ( the current wal ) is in the partial directory, if the master die,
the restore.sh will copy logN+2 in the archived directory, the spare node will
execute restore.sh with file logN+1 as argument and if is not found then the
restore.sh will exit.


Regards
Gaetano Mendola











view thread (9+ messages)  latest in thread

Message-ID: <4179729A.5020401@bigfoot.com>
Permalink:  ../4179729A.5020401@bigfoot.com/
Also on:    postgresql.org/message-id/4179729A.5020401@bigfoot.com

 · 

reply

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: mendola@bigfoot.com, simon@2ndquadrant.com
  Subject: Re: replication using WAL archives
  In-Reply-To: <4179729A.5020401@bigfoot.com>
  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> <4179729A.5020401@bigfoot.com>

* 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