pg13 streaming replication returns empty pg_replication_slot on SLAVE replica.
select * from pg_replication_slots;
returns nothing on SLAVE replica
when do
select status,slot_name, last_msg_receipt_time,latest_end_lsn from pg_stat_wal_receiver;
status | slot_name | last_msg_receipt_time | latest_end_lsn | |
---|---|---|---|---|
streaming | mycluster | 2025-01-16 00:56:02.661538+00 | 4/84313340 | |
(1 row) |
but on MASTER.
select slot_name,active,restart_lsn from pg_replication_slots;
slot_name | active | restart_lsn | |
---|---|---|---|
mycluster | t | 4/85B7D598 | |
(1 row) |
I expect that both MASTER and SLAVE will return same slot_name. Am I correct?
That is as expected. The replication slot is a data structure that exists only on the primary server.