Re: Sync Rep: First Thoughts on Code - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Sync Rep: First Thoughts on Code
Date
Msg-id 1228992022.20796.995.camel@hp_dx2400_1
Whole thread Raw
In response to Re: Sync Rep: First Thoughts on Code  (Aidan Van Dyk <aidan@highrise.ca>)
Responses Re: Sync Rep: First Thoughts on Code  (Aidan Van Dyk <aidan@highrise.ca>)
List pgsql-hackers
On Wed, 2008-12-10 at 15:06 -0500, Aidan Van Dyk wrote:

> Call me think, but I'm confused... In sync rep, there *can't be* any
> catchign up do do... i.e. if the "slave" isn't accepting the WAL the
> master "stops" doing *anything*...

In normal/steady state, yes, you are correct. But there is more...

The simplest way to configure standby would be to freeze the primary
while we setup the standby and then go straight into normal/steady
state. That could mean hours of downtime for large databases, which is
unacceptable in a feature aimed at increasing availability. So we need
to allow the primary to continue working while the standby is setup.
That then creates a log gap between the LSN of the primary and the LSN
of the standby, which must be resolved.

So the catchup occurs during the transient initial phase when standby is
catching up with primary before they continue together in normal/steady
state. 

Most of the architectural discussion over last few months has been about
the need for the initial state and how to handle it. Most of the code
complexity also.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: "Fujii Masao"
Date:
Subject: Re: Sync Rep: First Thoughts on Code
Next
From: KaiGai Kohei
Date:
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches (r1268)