On Thu, Feb 10, 2022 at 12:54 PM Mladen Gogala <gogala.mladen@xxxxxxxxx> 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
https://www.postgresql.org/docs/current/functions-admin.html#FUNCTIONS-RECOVERY-CONTROL
David J.