Re: pgsql: Fix WAL replay in presence of an incomplete record

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-committers@lists.postgresql.org
Date: 2021-09-29T23:50:03Z
Lists: pgsql-hackers
Hi Alvaro,

On Wed, Sep 29, 2021 at 02:40:29PM +0000, Alvaro Herrera wrote:
> Fix WAL replay in presence of an incomplete record
> [...]
> src/test/recovery/t/026_overwrite_contrecord.pl | 207 ++++++++++++++++++++++++
> src/test/recovery/t/idiosyncratic_copy          |  20 +++

The builfarm is saying that this test fails on Windows:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=jacana&dt=2021-09-29%2020%3A00%3A01
Sep 29 17:27:23 t/026_overwrite_contrecord..........FAILED--Further testing stopped: command "pg_basebackup -D...
[...]
pg_basebackup: error: connection to server at "127.0.0.1", port 55644 failed: FATAL:  no pg_hba.conf entry for replication connection from host "127.0.0.1", user "pgrunner", no encryption

+# Second test: a standby that receives WAL via archive/restore commands.
+$node = PostgresNode->new('primary2');
+$node->init(
+   has_archiving => 1,
+   extra         => ['--wal-segsize=1']);

The error is here, where you need to set has_streaming => 1 to set up
primary2 correctly on Windows (see 992d353).

Thanks,
--
Michael

Commits

  1. Repair two portability oversights of new test

  2. Fix WAL replay in presence of an incomplete record

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