I got it, thank you. 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.
> On 8 May 2020, at 14:50, Sergei Kornilov <s...@zsrv.org> wrote: > > 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