How to query "primary_slot_name" in slave server?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to query "primary_slot_name" in slave server?

Edson Richter
Hi!

I've been searching over the net, but cannot find a reference.
I know that in server I can execute "select * from pg_replication_slots" and get all created slots.
But how can I query slave to know wich primay slot it is connecting to?

Thanks in advance,

Edson
Reply | Threaded
Open this post in threaded view
|

Re: How to query "primary_slot_name" in slave server?

Paul Förster
Hi Edson,

query the following on the replica:

pg_stat_wal_receiver

Cheers,
Paul

> On 25. Mar, 2020, at 13:59, Edson Richter <[hidden email]> wrote:
>
> Hi!
>
> I've been searching over the net, but cannot find a reference.
> I know that in server I can execute "select * from pg_replication_slots" and get all created slots.
> But how can I query slave to know wich primay slot it is connecting to?
>
> Thanks in advance,
>
> Edson



Reply | Threaded
Open this post in threaded view
|

RE: How to query "primary_slot_name" in slave server?

Edson Richter
De: Paul Förster <[hidden email]>
Enviado: quarta-feira, 25 de março de 2020 11:42
Para: Edson Richter <[hidden email]>
Cc: pgsql-general <[hidden email]>
Assunto: Re: How to query "primary_slot_name" in slave server?
 
Hi Edson,

query the following on the replica:

pg_stat_wal_receiver


Perfect, thanks!

Edson



Cheers,
Paul

> On 25. Mar, 2020, at 13:59, Edson Richter <[hidden email]> wrote:
>
> Hi!
>
> I've been searching over the net, but cannot find a reference.
> I know that in server I can execute "select * from pg_replication_slots" and get all created slots.
> But how can I query slave to know wich primay slot it is connecting to?
>
> Thanks in advance,
>
> Edson