Re: prevent immature WAL streaming

Alvaro Herrera <alvherre@alvh.no-ip.org>

From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: masao.fujii@oss.nttdata.com, andres@anarazel.de, pgsql-hackers@lists.postgresql.org, bossartn@amazon.com, mengjuan.cmj@alibaba-inc.com, Jakub.Wartak@tomtom.com
Date: 2021-09-04T00:03:45Z
Lists: pgsql-hackers
On 2021-Sep-03, Alvaro Herrera wrote:

> I thought that the way to have debug output for this new WAL code is to
> use WAL_DEBUG; that way it won't bother anyone and we can remove them
> later if necessary.
> 
> Also, I realized that we should cause any error in the path that
> assembles a record from contrecords is to set a flag that we can test
> after the standard "err:" label; no need to create a new label.
> 
> I also wrote a lot more comments to try and explain what is going on and
> why.
> 
> I'm still unsure about the two-flags reporting in xlogreader, so I put
> that in a separate commit.  Opinions on that one?
> 
> The last commit is something I noticed in pg_rewind ...

Oh, the pg_rewind tests died.  I fat-fingered the Assert conversion.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/



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