Re: [BUG] non archived WAL removed during production crash recovery

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, masao(dot)fujii(at)oss(dot)nttdata(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: [BUG] non archived WAL removed during production crash recovery
Date: 2020-04-22 07:32:23
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-hackers

On Wed, Apr 22, 2020 at 10:19:35AM +0900, Michael Paquier wrote:
> You are right here. The restriction can be removed, and I have
> checked that the test from v8 is able to pass on my Windows dev VM.

Attached are versions for each branch down to 9.5. While working on
the backpatch, I have not found major conflicts except one thing:
up to 10, Postgres does WAL segment recycling after two completed
checkpoints, and the 8th test of the script relies on the behavior of
11~ of one completed checkpoint (first .ready file present in the cold
backup but removed removed from $standby1). I have taken the simplest
approach to fix the test by checking that the .ready file actually
exists, while the rest of the test remains the same.

It is worth noting that for 9.5 and 9.6 the test had compatibility
issues with the renaming of pg_xlog to pg_wal, including paths and
functions. The calls to poll_query_until() also needed tweaks, but
I got the tests to work.

Attachment Content-Type Size
0001-Fix-handling-of-WAL-segments-ready-to-be-arch-master.patch text/x-diff 17.1 KB
0001-Fix-handling-of-WAL-segments-ready-to-be-archived-12.patch text/x-diff 16.7 KB
0001-Fix-handling-of-WAL-segments-ready-to-be-archived-11.patch text/x-diff 16.7 KB
0001-Fix-handling-of-WAL-segments-ready-to-be-archived-10.patch text/x-diff 16.7 KB
0001-Fix-handling-of-WAL-segments-ready-to-be-archived-96.patch text/x-diff 16.7 KB
0001-Fix-handling-of-WAL-segments-ready-to-be-archived-95.patch text/x-diff 16.8 KB

In response to


Browse pgsql-bugs by date

  From Date Subject
Next Message Arthur Nascimento 2020-04-22 12:15:01 Re: BUG #16380: documentation: host[no]gssenc vs. address/IP-address/IP-mask fields
Previous Message Fujii Masao 2020-04-22 03:17:11 Re: pg_stat_statements: rows not updated for CREATE TABLE AS SELECT statements

Browse pgsql-hackers by date

  From Date Subject
Next Message Rajkumar Raghuwanshi 2020-04-22 07:50:55 create partition table caused server crashed with self-referencing foreign key
Previous Message Eugen Konkov 2020-04-22 07:05:19 Re: [PATCH] distinct aggregates within a window function WIP