Re: Strange decreasing value of pg_last_wal_receive_lsn() - Mailing list pgsql-hackers

From godjan •
Subject Re: Strange decreasing value of pg_last_wal_receive_lsn()
Date
Msg-id F60D5616-FE83-4FC1-987E-DD0554B41E04@gmail.com
Whole thread Raw
In response to Re: Strange decreasing value of pg_last_wal_receive_lsn()  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Strange decreasing value of pg_last_wal_receive_lsn()  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
synchronous_standby_names=ANY 1(host1, host2)
synchronous_commit=on

So to understand which standby wrote last data to disk I should know receive_lsn or write_lsn.

Sent from my iPhone

> On 9 May 2020, at 13:48, Michael Paquier <michael@paquier.xyz> wrote:
>
> On Fri, May 08, 2020 at 03:02:26PM +0500, godjan • wrote:
>> Can you recommend what to use to determine which quorum standby
>> should be promoted in such case?
>> We planned to use pg_last_wal_receive_lsn() to determine which has
>> fresh data but if it returns the beginning of the segment on both
>> replicas we can’t determine which standby confirmed that write
>> transaction to disk.
>
> If you want to preserve transaction-level consistency across those
> notes, what is your configuration for synchronous_standby_names and
> synchronous_commit on the primary?  Cannot you rely on that?
> --
> Michael



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: valgrind error
Next
From: Andrew Dunstan
Date:
Subject: Re: Cast json array to postgres array and preserve order of elements