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

From Sergei Kornilov
Subject Re: Strange decreasing value of pg_last_wal_receive_lsn()
Date
Msg-id 1474241588931298@mail.yandex.ru
Whole thread Raw
In response to Strange decreasing value of pg_last_wal_receive_lsn()  (godjan • <g0dj4n@gmail.com>)
Responses Re: Strange decreasing value of pg_last_wal_receive_lsn()
List pgsql-hackers
Hello

Yes, this is expected. Walreceiver always start streaming from beginning of the wal segment.
./src/backend/replication/walreceiverfuncs.c in RequestXLogStreaming:

     * We always start at the beginning of the segment. That prevents a broken
     * segment (i.e., with no records in the first half of a segment) from
     * being created by XLOG streaming, which might cause trouble later on if
     * the segment is e.g archived.

regards, Sergei



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Dumping/restoring fails on inherited generated column
Next
From: godjan •
Date:
Subject: Re: Strange decreasing value of pg_last_wal_receive_lsn()