Re: Wal file query

2025-04-08 Thread Ron Johnson
You cannot connect to the Primary while connected to the Replica, except via postgres_fdw. Even then, it might not work, since the replica replicates _fdw definitions. These exist on the primary: pg_current_wal_lsn() pg_replication_slots pg_stat_replication These exist on the replica: pg_last_

Re: Wal file query

2025-04-08 Thread Atul Kumar
I got the error: Wal control functions cannot be executed during recovery. I need the solution that should in when streaming replication is configured. My postgres version is 13.20 Regards. On Tue, 8 Apr 2025, 17:32 Kashif Zeeshan, wrote: > Hi Atul > > Start by looking at the current WAL LS

Re: Wal file query

2025-04-08 Thread Kashif Zeeshan
Hi Atul Start by looking at the current WAL LSN and insert LSN. The pg_current_wal_lsn is the location of the last write. The pg_current_wal_insert_lsn is the logical location and reflects data in the buffer that has not been written to disk. There is also a flush value that shows what has been wr

Wal file query

2025-04-08 Thread Atul Kumar
In streaming replication What is the way to check which "WAL file" is currently in use in primary and in standby ? Regards.