Re: tell master to tell it's the master - ?

From: Emile Amewoto <emileam(at)yahoo(dot)com>
To: lejeczek <peljasz(at)yahoo(dot)co(dot)uk>
Cc: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: tell master to tell it's the master - ?
Date: 2023-08-18 09:34:47
Message-ID: 6B782D94-E9A9-48D3-829F-0F1DF9585189@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Lejeczek,
What are you using to control your cluster?
If you are using patroni, you can use regex to grep the Leader or if you are not using any cluster manager you can do:

SELECT Count(pid))
FROM pg_stat_activity WHERE wait_event IS NOT NULL AND backend_type = ‘walsender'
The master will always have walsender process and the standby walreiver

Regards,
Emile

> On 18 Aug 2023, at 11:07, lejeczek <peljasz(at)yahoo(dot)co(dot)uk> wrote:
>
> Hi guys.
>
> Is it possible to configure pgSQL to announce it's being a master and not querying it?
> I was hoping for a file whose existence or content would confirm that and would be generated/created by pqSQL itself - am I too naive?
>
> many thanks, L.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message lejeczek 2023-08-18 11:06:58 Re: tell master to tell it's the master - ?
Previous Message lejeczek 2023-08-18 09:07:14 tell master to tell it's the master - ?