mirror of
https://github.com/postgres/postgres.git
synced 2025-10-22 14:32:25 +03:00
Introduce a new GUC_REPORT setting "in_hot_standby".
Aside from being queriable via SHOW, this value is sent to the client immediately at session startup, and again later on if the server gets promoted to primary during the session. The immediate report will be used in an upcoming patch to avoid an extra round trip when trying to connect to a primary server. Haribabu Kommi, Greg Nancarrow, Tom Lane; reviewed at various times by Laurenz Albe, Takayuki Tsunakawa, Peter Smith. Discussion: https://postgr.es/m/CAF3+xM+8-ztOkaV9gHiJ3wfgENTq97QcjXQt+rbFQ6F7oNzt9A@mail.gmail.com
This commit is contained in:
@@ -1859,8 +1859,11 @@ if (!triggered)
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Users will be able to tell whether their session is read-only by
|
||||
issuing <command>SHOW transaction_read_only</command>. In addition, a set of
|
||||
Users can determine whether hot standby is currently active for their
|
||||
session by issuing <command>SHOW in_hot_standby</command>.
|
||||
(In server versions before 14, the <varname>in_hot_standby</varname>
|
||||
parameter did not exist; a workable substitute method for older servers
|
||||
is <command>SHOW transaction_read_only</command>.) In addition, a set of
|
||||
functions (<xref linkend="functions-recovery-info-table"/>) allow users to
|
||||
access information about the standby server. These allow you to write
|
||||
programs that are aware of the current state of the database. These
|
||||
|
Reference in New Issue
Block a user