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

From: Elvis Pranskevichus <elprans(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH v1] Add and report the new "in_hot_standby" GUC pseudo-variable.
Date: 2017-03-17 17:56:00
Message-ID: 1700970.cRWpxnom9y@hammer.magicstack.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Currently, clients wishing to know when the server exits hot standby
have to resort to polling, which is often suboptimal.

This adds the new "in_hot_standby" GUC variable that is reported via a
ParameterStatus message. This allows the clients to:

(a) know right away that they are connected to a server in hot
standby; and

(b) know immediately when a server exits hot standby.

This change will be most beneficial to various connection pooling
systems (pgpool etc.)

Elvis

Attachment Content-Type Size
v1-0001-Add-and-report-the-new-in_hot_standby-GUC-pseudo-.patch text/x-patch 13.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-03-17 17:57:07 Re: [COMMITTERS] pgsql: Fix and simplify check for whether we're running as Windows serv
Previous Message Tom Lane 2017-03-17 17:50:51 Re: merging duplicate definitions of adjust_relid_set