Determine if postgresql cluster running is primary or not

From: Raul Kaubi <raulkaubi(at)gmail(dot)com>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Determine if postgresql cluster running is primary or not
Date: 2020-11-20 08:53:47
Message-ID: CAO_+3-AV1WV_RfZ=7sbvNtwoZpvL23kpyzaUBJWRxhP47NVdOA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2020-11-20 09:03:21 Re: Determine if postgresql cluster running is primary or not
Previous Message Tim Clarke 2020-11-20 08:50:47 Re: Meaning of below statement