Determine if postgresql cluster running is primary or not - Mailing list pgsql-general

From Raul Kaubi
Subject Determine if postgresql cluster running is primary or not
Date
Msg-id CAO_+3-AV1WV_RfZ=7sbvNtwoZpvL23kpyzaUBJWRxhP47NVdOA@mail.gmail.com
Whole thread Raw
Responses Re: Determine if postgresql cluster running is primary or not  (Thomas Kellerer <shammat@gmx.net>)
List pgsql-general
Hi

CentOS 7
Postgres 9 to 12

For monitoring purpose, I would like that certain scripts are only run in primary server.
So I am looking ways to universally discover if postgresql cluster that is running is primary or not.

What would be the best way to achieve this?

Regards
Raul

pgsql-general by date:

Previous
From: Tim Clarke
Date:
Subject: Re: Meaning of below statement
Next
From: Thomas Kellerer
Date:
Subject: Re: Determine if postgresql cluster running is primary or not