Strange decreasing value of pg_last_wal_receive_lsn()

From: godjan • <g0dj4n(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Strange decreasing value of pg_last_wal_receive_lsn()
Date: 2020-05-08 09:36:21
Message-ID: D660E990-866D-4E03-9AD4-662F132DBA50@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

PG12
Steps to reproduce on 3 nodes cluster with quorum commit.
1. Cut off network on master with everything.
2. Pkill -9 PostgreSQL on each node.
3. Start PostgreSQL on each node.

What was strange?
I check every second pg_last_wal_replay_lsn() and pg_last_wal_receive_lsn().

All time it was the same.
For example last output before killing PostgreSQL:
2020-05-08 08:31:44,495 DEBUG: Last replayed LSN: 0/502E3D8
2020-05-08 08:31:44,497 DEBUG: Last received LSN: 0/502E3D8

After starting PostgreSQL I got this:
2020-05-08 08:31:55,324 DEBUG: Last replayed LSN: 0/502E3D8
2020-05-08 08:31:55,326 DEBUG: Last received LSN: 0/5000000

Why could it happen and is it expected behaviour?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2020-05-08 09:40:00 Re: PG 13 release notes, first draft
Previous Message Laurenz Albe 2020-05-08 08:58:24 COPY, lock release and MVCC