Re: how to know current xlog location on standby after primary is down

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: magodo <wztdyl(at)sina(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: how to know current xlog location on standby after primary is down
Date: 2018-09-10 06:50:54
Message-ID: 20180910065054.GH19122@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Csaba Ragasits 2018-09-10 08:22:20 PG8.3->10 migration data differences
Previous Message Ahmed, Nawaz 2018-09-10 04:19:37 RE: connection error