From: Victor Wagner <vitus@wagner.pp.ru>
To: pgsql-hackers@postgresql.org
Subject: Re: Proposal: Implement failover on libpq connect level.
Date: Tue, 8 Sep 2015 07:29:32 +0300
Message-ID: <20150908072932.72f4e974@wagner.wagner.home> (raw)
In-Reply-To: <8cebcc80-6d93-47e2-8168-4dc9e4d08bad@mm>
References: <20150819074417.GE31302@wagner.pp.ru>
<8cebcc80-6d93-47e2-8168-4dc9e4d08bad@mm>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
В Mon, 07 Sep 2015 17:32:48 +0200
"Daniel Verite" <daniel@manitou-mail.org> пишет:
> Victor Wagner wrote:
>
> > It would just take a bit more time for client and a bit more load
> > for server - to make sure that this connection is read-write by
> > issuing
> >
> > show transaction_read_only
> >
> > statement before considering connection useful.
>
> If the purpose of the feature is to wait for a failover to complete,
> shouldn't it check for pg_is_in_recovery() rather than
> transaction_read_only ?
>
Purpose of this feature is to distinguish between master and standby
servers.
This allows failover system to work with standby servers accepting
client connections, and even to create system where read-only clients
can be loadbalanced among several hot backup servers, and read-write
clients work with master, but do not need reconfiguration when
failover happens.
pg_is_in_recovery() is really better. But it seems that chapter 25 of
documentation should be improved and this function mentioned in the
section 25.5.1 (Hot Standby / User Overview)
--
Victor Wagner <vitus@wagner.pp.ru>
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: vitus@wagner.pp.ru, pgsql-hackers@postgresql.org
Subject: Re: Proposal: Implement failover on libpq connect level.
In-Reply-To: <20150908072932.72f4e974@wagner.wagner.home>
References: <20150819074417.GE31302@wagner.pp.ru> <8cebcc80-6d93-47e2-8168-4dc9e4d08bad@mm> <20150908072932.72f4e974@wagner.wagner.home>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox