Re: Re: Synch Rep: direct transfer of WAL file from the primary to the standby

From: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Greg Stark <gsstark(at)mit(dot)edu>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: Synch Rep: direct transfer of WAL file from the primary to the standby
Date: 2009-07-08 08:06:08
Message-ID: 87skh7bnv3.fsf@hi-media-techno.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> I think this fails the basic sanity check: do you need it to still work
> when the master is dead.

I don't get it. Why would we want to setup a slave against a dead
master?

The way I understand the current design of Synch Rep, when you start a
new slave the following happen:

1. init: slave asks the master the current LSN and start streaming WAL

2. setup: slave asks the master for missing WALs from its current
position to this LSN it just got, and apply them all to reach
initial LSN (this happen in parallel to 1.)

3. catchup: slave has replayed missing WALs and now is replaying the
stream he received in parallel, and which applies from init LSN
(just reached)

4. sync: slave is no more lagging, it's applying the stream as it gets
it, either as part of the master transaction or not depending on the
GUC settings

So, what I'm understanding you're saying is that the slave still should
be able to setup properly when master died before it synced. What I'm
saying is that if master dies before any sync slave exists, you get to
start from backups (filesystem snaphost + archives for example, PITR
recovery etc), as there's no slave.

Regards,
--
dim

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Urbański 2009-07-08 08:23:42 Re: *_collapse_limit, geqo_threshold
Previous Message Dean Rasheed 2009-07-08 07:48:49 Re: WIP: generalized index constraints