bf-test.txt

text/plain

Filename: bf-test.txt
Type: text/plain
Part: 0
Message: Re: Synchronizing slots from primary to standby
Keep sync_replication_slots as disabled on standby.

--primary:
SELECT 'init' FROM pg_create_logical_replication_slot('logicalslot', 'test_decoding', false, false, true);

SELECT pg_log_standby_snapshot();
SELECT pg_log_standby_snapshot();
SELECT pg_log_standby_snapshot();
SELECT pg_log_standby_snapshot();
select pg_sleep(2);

SELECT pg_replication_slot_advance('logicalslot', pg_current_wal_lsn());
select slot_name,database,xmin,catalog_xmin cxmin,restart_lsn,confirmed_flush_lsn flushLsn,wal_status,conflicting conf, failover,synced,temporary temp, active from pg_replication_slots order by slot_name;

--standby:
select pg_sync_replication_slots();
select pg_sync_replication_slots(); -- ERROR here