Re: Libpq support to connect to standby server as priority - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Libpq support to connect to standby server as priority
Date
Msg-id CA+TgmobQW_+uT0Z6grDeUnfnyCk61YQNJEJ-ZhDES4s75mK12g@mail.gmail.com
Whole thread Raw
In response to Re: Libpq support to connect to standby server as priority  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses RE: Libpq support to connect to standby server as priority
List pgsql-hackers
On Fri, Dec 27, 2019 at 8:08 AM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
> So, we can know whether server is primary/standby by checking
> in_recovery, as opposed to knowing whether read-write which is done by
> checking transaction_read_only.  So we can keep read-write as a synonym
> for "primary", and check in_recovery when used in servers that support
> the new GUC, and check transaction_read_only in older servers.

I think it would be better to have read-write and read-only check
trnasaction_read_only, and primary and standby can check the new
thing. There can never be any real advantage in having synonyms for
the same thing, but there can be an advantage to letting users choose
the behavior they want.

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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: run pgindent on a regular basis / scripted manner
Next
From: Robert Haas
Date:
Subject: Re: run pgindent on a regular basis / scripted manner