Re: BUG #19093: Behavioral change in walreceiver termination between PostgreSQL 14.17 and 14.18
Xuneng Zhou <xunengzhou@gmail.com>
From: Xuneng Zhou <xunengzhou@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Noah Misch <noah@leadboat.com>, ryanzxg@gmail.com,
pgsql-bugs@lists.postgresql.org, Euler Taveira <euler@eulerto.com>
Date: 2025-10-31T10:50:06Z
Lists: pgsql-bugs
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add assertions checking for the startup process in WAL replay routines
- 2fc31079624e 19 (unreleased) landed
-
Add assertion check for WAL receiver state during stream-archive transition
- 65f4976189b6 19 (unreleased) landed
-
Add WalRcvGetState() to retrieve the state of a WAL receiver
- e0ca61e7c4d5 19 (unreleased) landed
-
Fix unconditional WAL receiver shutdown during stream-archive transition
- 25b484080f14 13.23 landed
- a1b8b3b2e385 14.20 landed
- da5ea6c70bc4 15.15 landed
- 9b61096074af 16.11 landed
- e7340b484c34 17.7 landed
- a14201073965 18.1 landed
- 17b2d5ec759c 19 (unreleased) landed
-
Add test tracking WAL receiver shutdown for primary_conninfo updates
- c9e38a569c5f 19 (unreleased) landed
-
Reset InstallXLogFileSegmentActive after walreceiver self-initiated exit.
- 3635a0a35aaf 14.18 cited
- b4f584f9d2a1 16.0 cited
-
Replace durable_rename_excl() by durable_rename(), take two
- 1f95181b44c8 14.16 cited
-
Split xlog.c into xlog.c and xlogrecovery.c.
- 70e81861fadd 15.0 cited
Attachments
- v3-0002-Add-WalRcvGetState-function-to-retrieve-walreceiv.patch (application/octet-stream) patch v3-0002
- v3-0001-Fix-unconditional-walreceiver-shutdown-during.patch (application/octet-stream) patch v3-0001
- v3-0003-Add-assertion-for-walreceiver-state-invariant-in-.patch (application/octet-stream) patch v3-0003
Hi, On Fri, Oct 31, 2025 at 11:16 AM Michael Paquier <michael@paquier.xyz> wrote: > > On Fri, Oct 31, 2025 at 12:07:01AM +0800, Xuneng Zhou wrote: > > Using a wrapper function seems better here. > > For a cleaner git history, the wrapper function and the assertion > should be split as its own commit, with the actual fix applied first. > Just an opinion. > It makes sense to me. I've split the patch for HEAD into three patch sets. Please see the attached files. > > I’ve incorporated both tests and the assertion into the patch applied to master. > > For earlier stable branches, the test in > > 040_standby_failover_slots_sync.pl and the assertion for > > WAL receiver state checking are not included (if Noah agrees too). Please check. > > Thanks for doing that. I have extracted the test to check the "valid" > WAL receiver shutdown case, and applied that separately. Thanks for checking and pushing this. Best, Xuneng