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

From: Elvis Pranskevichus <elprans(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Subject: Re: [PATCH v1] Add and report the new "in_hot_standby" GUC pseudo-variable.
Date: 2017-03-22 21:02:57
Message-ID: 1776752.pAhDKDcDgB@hammer.magicstack.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday, March 22, 2017 4:28:18 PM EDT Robert Haas wrote:
> On Wed, Mar 22, 2017 at 4:00 PM, Peter Eisentraut
> > I think we could use "in_recovery", which would be consistent with
> > existing naming.
>
> True.

Ironically, that was the name I originally used. I'll update the patch.

> (Jaime's question is also on point, I think.)

The main (and only) point of this patch is to avoid polling. Since
"in_recovery" is marked as GUC_REPORT, it will be sent to the client
asynchronously in a ParamStatus message. Other GUC_REPORT variables set
a good precedent.

My argument is that Hot Standby is a major mode of operation, which
significantly alters how connected clients work with the server, and
this bit of knowledge is no less important than the other GUC_REPORT
vars.

Elvis

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2017-03-22 21:03:45 Re: extended statistics: n-distinct
Previous Message Stephen Frost 2017-03-22 20:43:34 Re: PATCH: Make pg_stop_backup() archive wait optional