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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx> 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.


[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux