Re: Synchronous replication, network protocol

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Pavan Deolasee <pavan(dot)deolasee(at)enterprisedb(dot)com>
Subject: Re: Synchronous replication, network protocol
Date: 2008-12-29 11:02:04
Message-ID: 4958AE2C.7010601@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs wrote:
> On Tue, 2008-12-23 at 18:23 +0200, Heikki Linnakangas wrote:
>> (later) OldestXmin <xid>
>> When a hot standby server is running read-only queries,
>> indicates the
>> current OldestXmin on the standby. The primary can refrain from
>> vacuuming tuples still required by the slave using this value, if so
>> configured.
>
> This is all reading like you are relaying someone else's thoughts, or
> that of a committee.

No, I can assure you all the confusing words are from my head only :-).

> The above is the exact opposite of your position on 11 Sep, where you
> said having a matching xmin between primary and standby "makes an awful
> solution for high availability" which Richard, Greg, Robert at least
> agreed explicitly with.

It does, for high availability. There's other use cases where it might
be desired (spreading load of read-only queries across servers). And a
softer version where the master only respects the slaves OldestXmin up
to a point is a good compromise for high availability setups too.

I haven't seen any one-size-fits-all solution to this issue, so we have
to cater for many. Note that I proposed this exact scheme, where the
slave sends its OldestXmin to the master, at the bottom of that same email.

>> That will ensure that the standby doesn't need to stall WAL
>> application because of read-only queries.
>
> It doesn't need to. That is already optional.

Oh right. I should've added, "without having to kill queries".

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2008-12-29 11:25:12 About CMake (was Re: [COMMITTERS] pgsql: Append major version number and for libraries soname major)
Previous Message Heikki Linnakangas 2008-12-29 10:45:45 Re: Hot standby and b-tree killed items