Re: [HACKERS] [PATCH v1] Add and report the new "in_hot_standby" GUC pseudo-variable. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] [PATCH v1] Add and report the new "in_hot_standby" GUC pseudo-variable.
Date
Msg-id 3091.1495664459@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] [PATCH v1] Add and report the new "in_hot_standby" GUC pseudo-variable.  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] [PATCH v1] Add and report the new "in_hot_standby"GUC pseudo-variable.  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, May 24, 2017 at 3:16 AM, Tsunakawa, Takayuki
> <tsunakawa.takay@jp.fujitsu.com> wrote:
>> For this, I added a GUC_REPORT variable session_read_only which indicates the session's default read-only status.
Thecharacteristics are:
 
>> 
>> * It cannot be changed directly by the user (postgresql.conf, SET, etc.)
>> * Its value is the same as default_transaction_read_only when not in recovery.

I didn't look at exactly how you tried to do that, but GUCs whose values
depend on other GUCs generally don't work well at all.

>> * Its value is false during recovery.

[ scratches head... ]  Surely this should read as "true" during recovery?
Also, what happens if the standby server goes live mid-session?

>> Could you include this in PG 10?

I concur with Robert that this is too late for v10, and the argument to
shove it in anyway is not compelling.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] [PATCH v1] Add and report the new "in_hot_standby" GUC pseudo-variable.
Next
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Improvement in log message of logical replicationworker