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

From Robert Haas
Subject Re: [PATCH v1] Add and report the new "in_hot_standby" GUC pseudo-variable.
Date
Msg-id CA+TgmoYE7nGHX8DAh+J5TyMnAb80YPW5YZM_5mHznB9HVM0p+A@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] [PATCH v1] Add and report the new "in_hot_standby" GUC pseudo-variable.  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
On Thu, Mar 23, 2017 at 4:50 AM, Magnus Hagander <magnus@hagander.net> wrote:
> One thing we might want to consider around this -- in 10 we have
> target_session_attrs=read-write (since
> 721f7bd3cbccaf8c07cad2707826b83f84694832), which will issue a SHOW
> transaction_read_only on the connection.
>
> We should probably consider if there is some way we can implement these two
> things the same way. If we're inventing a new variable that gets pushed on
> each connection, perhaps we can use that one and avoid the SHOW command?

I think that would be a good idea.  It was, in fact, proposed to do
exactly that as part of the patch that added
target_session_attrs=read-write, but we ended up not doing anything
about it because the SHOW mechanism would still be needed when
connecting to pre-10 versions of PostgreSQL.  Therefore, it seemed
like a separate improvement.  But if we're adding a GUC_REPORT value
that could be used for the same or a similar purpose, I think it would
make sense to consider revising that mechanism to leverage it as well,
obviously only on releases that have the GUC.

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



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Functions Immutable but not parallel safe?
Next
From: Tom Lane
Date:
Subject: Re: PG_GETARG_GISTENTRY?