Re: Is it possible to find out write_lsn on standby? - Mailing list pgsql-hackers

From Jehan-Guillaume de Rorthais
Subject Re: Is it possible to find out write_lsn on standby?
Date
Msg-id 20200513172918.19350262@firost
Whole thread Raw
In response to Is it possible to find out write_lsn on standby?  (godjan • <g0dj4n@gmail.com>)
List pgsql-hackers
Hello,

On Fri, 8 May 2020 18:25:02 +0500
godjan • <g0dj4n@gmail.com> wrote:

> On primary I can execute ’SELECT write_lsn FROM pg_stat_replication;’ and get
> write_lsn of standby. I didn’t find function like "pg_last_write_lsn()” to
> get write_lsn on standby. Is it possible?

No, there's no admin function exposing it. The closest one is
pg_last_wal_receive_lsn() which is related to pg_stat_replication.flush_lsn.

There was discussions to create eg. pg_stat_wal_receiver view few weeks/moth
ago. But this is nowhere close to something. No patch ready yet.

Regards,



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: SLRU statistics
Next
From: Tom Lane
Date:
Subject: Re: Add "-Wimplicit-fallthrough" to default flags