pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Tsunakawa, Takayuki <tsunakawa.takay@jp.fujitsu.com>
Cc: Dave Cramer <pg@fastcrypt.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: laurenz.albe@cybertec.at <laurenz.albe@cybertec.at>
Cc: Haribabu Kommi <kommi.haribabu@gmail.com>
Cc: Jing Wang <jingwangian@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Libpq support to connect to standby server as priority
Date: Mon, 14 Jan 2019 21:53:17 -0500
Message-ID: <30679.1547520797@sss.pgh.pa.us> (raw )
In-Reply-To: <20190115024855.GC1433@paquier.xyz >
References: <CAJrrPGcMq9YgG-aMzLK051EndUgjdnpp8_dJwJaNDZbu=sS0qQ@mail.gmail.com >
<CAJrrPGcwt0LLLzDF9c3-zWrESJCJko-HovDOrMobkaWQaJ5YUw@mail.gmail.com >
<67be09458f276c0c95a4b2a2a383dca9775d19cd.camel@cybertec.at >
<26890.1542047012@sss.pgh.pa.us >
<096a642cff0dd68b8157a5f8838e1762d0050d18.camel@cybertec.at >
<28777.1542386147@sss.pgh.pa.us >
<CA+TgmoY7hRUJyAsDAwgrJVxNVjPgBD50jBccd5795=KQdNz8fw@mail.gmail.com >
<CADK3HH+eMdju_peR3ugnu6EYQkZB0vzvqrDQVKxDB2+ea3iQfA@mail.gmail.com >
<26251.1547504236@sss.pgh.pa.us >
<0A3221C70F24FB45833433255569204D1FB67687@G01JPEXMBYT05 >
<20190115024855.GC1433@paquier.xyz >
Michael Paquier <michael@paquier.xyz> writes:
> On Tue, Jan 15, 2019 at 02:00:57AM +0000, Tsunakawa, Takayuki wrote:
>> The original desire should have been the ability to connect to a
>> primary or a standby. So, I think we should go back to the original
>> thinking (and not complicate the feature), and create a read only
>> GUC_REPORT variable, say, server_role, that identifies whether the
>> server is a primary or a standby.
> From the point of view of making sure that a client is really
> connected to a primary or a standby, this is the best idea around.
There are a couple of issues here:
1. Are you sure there are no use-cases for testing transaction_read_only
as such?
2. What will the fallback implementation be, when connecting to a server
too old to have the variable you want?
regards, tom lane
view thread (149+ messages) latest in thread
Message-ID: <30679.1547520797@sss.pgh.pa.us>
Permalink: ../30679.1547520797@sss.pgh.pa.us/
Also on: postgresql.org/message-id/30679.1547520797@sss.pgh.pa.us
copy link · copy postgr.es
reply 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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, tsunakawa.takay@jp.fujitsu.com, pg@fastcrypt.com, robertmhaas@gmail.com, laurenz.albe@cybertec.at, kommi.haribabu@gmail.com, jingwangian@gmail.com
Subject: Re: Libpq support to connect to standby server as priority
In-Reply-To: <30679.1547520797@sss.pgh.pa.us>
* 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