Re: Sync Rep v19 - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Sync Rep v19
Date
Msg-id AANLkTimw-urqbaViOT-kK95_6O=vzQ8MvdYpSnnnyDAa@mail.gmail.com
Whole thread Raw
In response to Re: Sync Rep v19  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Responses Re: Sync Rep v19
List pgsql-hackers
On Thu, Mar 10, 2011 at 2:42 PM, Dimitri Fontaine
<dimitri@2ndquadrant.fr> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> was.  So you could then say things like "is the most recent time at
>> which the standby was caught up within the last 30 seconds?", which
>> would be a useful thing to monitor, and right now there's no way to do
>
> Well in my experience with replication, that's not what I want to
> monitor.  If the standby is synchronous, then it's not catching up, it's
> streaming.  If it were not, it would not be a synchronous standby.
>
> When a standby is asynchronous then what I want to monitor is its lag.
>
> So the CATCHUP state is useful to see that a synchronous standby
> candidate can not yet be a synchronous standby.  When it just lost its
> synchronous status (and hopefully another standby is now the sync one),
> then it's just asynchronous and I want to know its lag.

Yeah, maybe.  The trick is how to measure the lag.  I proposed the
above scheme mostly as a way of giving the user some piece of
information that can be measured in seconds rather than WAL position,
but I'm open to better ideas.  Monitoring is pretty hard to do at all
in 9.0; in 9.1, we'll be able to tell them how many *bytes* behind
they are, but there's no easy way to figure out what that means in
terms of wall-clock time, which I think would be useful.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: Sync Rep v19
Next
From: Robert Haas
Date:
Subject: Re: [COMMITTERS] pgsql: Efficient transaction-controlled synchronous replication.