Re: How to determine whether I'm running on a standby? - Mailing list pgsql-general

From David G. Johnston
Subject Re: How to determine whether I'm running on a standby?
Date
Msg-id CAKFQuwaJvK1vz3D25tSemLrb_hAS3ZegCORJAG02r3WtADTxTg@mail.gmail.com
Whole thread Raw
In response to How to determine whether I'm running on a standby?  (Mladen Gogala <gogala.mladen@gmail.com>)
Responses Re: How to determine whether I'm running on a standby?  (Ron <ronljohnsonjr@gmail.com>)
List pgsql-general
On Thu, Feb 10, 2022 at 12:54 PM Mladen Gogala <gogala.mladen@gmail.com> wrote:

The procedure works fine on the primary but reports a bunch of errors on the read-only standbys.

A standby is in perpetual recovery mode. There is a function that returns a boolean true if you are in recovery.

https://www.postgresql.org/docs/current/functions-admin.html#FUNCTIONS-RECOVERY-CONTROL

David J.

pgsql-general by date:

Previous
From: Mladen Gogala
Date:
Subject: How to determine whether I'm running on a standby?
Next
From: Bruce Momjian
Date:
Subject: Re: Can we go beyond the standard to make Postgres radically better?