Skip site navigation (1) Skip section navigation (2)

register/unregister standby Re: Synchronous replication

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Joshua Tolley <eggyknap(at)gmail(dot)com>, Yeb Havinga <yebhavinga(at)gmail(dot)com>, Aidan Van Dyk <aidan(at)highrise(dot)ca>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: register/unregister standby Re: Synchronous replication
Date: 2010-08-30 12:14:42
Message-ID: AANLkTimCZZ3oHEhZms3Hi7DRSz-nYrZ7s6w_Nu7tMgdS@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Tue, Aug 10, 2010 at 5:58 AM, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> On 05/08/10 17:14, Fujii Masao wrote:
>>
>> I'm thinking to make users register and unregister each standbys via SQL
>> functions like register_standby() and unregister_standby():
>
> The register/unregister facility should be accessible from the streaming
> replication connection, so that you don't need to connect to any particular
> database in addition to the streaming connection.

Probably I've not understood your point correctly yet.

I think that the advantage of registering standbys is that we can
specify which WAL files the master has to keep for the upcoming
standby. IMO, it's usually called together with pg_start_backup
as follows:

    SELECT register_standby('foo', pg_start_backup())

This requests the master keep to all the WAL files following the
backup starting location which pg_start_backup returns. Now we
can do that by using wal_keep_segments, but it's not easy to set
because it's difficult to predict how many WAL files the standby
will require.

So I've thought that the register/unregister facility should be
used from the normal client connection. Why do you think it should
be accessible from the SR connection?

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Responses

pgsql-hackers by date

Next:From: Fujii MasaoDate: 2010-08-30 12:29:19
Subject: Re: pg_subtrans keeps bloating up in the standby
Previous:From: Pavel StehuleDate: 2010-08-30 11:51:55
Subject: Re: string function - "format" function proposal

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group