Re: prevent immature WAL streaming

Kyotaro Horiguchi <horikyota.ntt@gmail.com>

From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: alvherre@alvh.no-ip.org
Cc: Jakub.Wartak@tomtom.com, bossartn@amazon.com, pgsql-hackers@lists.postgresql.org, mengjuan.cmj@alibaba-inc.com
Date: 2021-08-26T01:20:52Z
Lists: pgsql-hackers
At Wed, 25 Aug 2021 20:20:04 -0400, "alvherre@alvh.no-ip.org" <alvherre@alvh.no-ip.org> wrote in 
> BTW while going about testing this, I noticed that we forbid
> pg_walfile_name() while in recovery.  That restriction was added by
> commit 370f770c15a4 because ThisTimeLineID was not set correctly during
> recovery.  That was supposed to be fixed by commit 1148e22a82ed, so I
> thought that it should be possible to remove the restriction.  However,
> I did that per the attached patch, but was quickly disappointed because
> ThisTimeLineID seems to remain zero in a standby for reasons that I
> didn't investigate.

On a intermediate node of a cascading replication set, timeline id on
walsender and walrecever can differ and ordinary backends cannot
decide which to use.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



Commits

  1. Fix determination of broken LSN in OVERWRITTEN_CONTRECORD

  2. Fix instability in 026_overwrite_contrecord.pl test.

  3. Fix typo

  4. Change recently added test code for stability

  5. Remove unstable, unnecessary test; fix typo

  6. Repair two portability oversights of new test

  7. Fix WAL replay in presence of an incomplete record

  8. Document XLOG_INCLUDE_XID a little better

  9. Revert "Avoid creating archive status ".ready" files too early"

  10. Avoid creating archive status ".ready" files too early

  11. Fix scenario where streaming standby gets stuck at a continuation record.

  12. Teach xlogreader to follow timeline switches

  13. Forbid using pg_xlogfile_name() and pg_xlogfile_name_offset() during