From: Michael Paquier <michael@paquier.xyz>
To: magodo <wztdyl@sina.com>
Cc: pgsql-general@postgresql.org
Subject: Re: how to know current xlog location on standby after primary is down
Date: Mon, 10 Sep 2018 15:50:54 +0900
Message-ID: <20180910065054.GH19122@paquier.xyz> (raw)
In-Reply-To: <4ffcd9e665cde2a7aaaaf55a3bc85145345e485c.camel@sina.com>
References: <4ffcd9e665cde2a7aaaaf55a3bc85145345e485c.camel@sina.com>
On Sun, Sep 09, 2018 at 10:29:08PM +0800, magodo wrote:
> So I want to know what is the correct way to do it. Thank you in
> advance!
There are pg_last_wal_receive_lsn() and pg_last_wal_replay_lsn() which
allow you to know what is the last LSN received and replayed on a
standby. Those can be used when an instance is in recovery.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: michael@paquier.xyz, wztdyl@sina.com
Subject: Re: how to know current xlog location on standby after primary is down
In-Reply-To: <20180910065054.GH19122@paquier.xyz>
References: <4ffcd9e665cde2a7aaaaf55a3bc85145345e485c.camel@sina.com> <20180910065054.GH19122@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox