Re: Infinite loop in XLogPageRead() on standby
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: cyberdemn@gmail.com, pgsql-hackers@postgresql.org, thomas.munro@gmail.com
Date: 2025-01-10T05:54:16Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix header check for continuation records where standbys could be stuck
- 0f0431e919f4 13.19 landed
- a2d4f806c4b9 14.16 landed
- 26554faccc97 15.11 landed
- 2c2e1d4f42c0 16.7 landed
- e6767c0ed16f 17.3 landed
- 6cf1647d87e7 18.0 landed
-
Move routines to manipulate WAL into PostgreSQL::Test::Cluster
- c9e50ce2a044 13.19 landed
- 50406b15540c 14.16 landed
- e5d113057d5f 15.11 landed
- 9420f9bb61e6 16.7 landed
- 149ed87e22ce 17.3 landed
- 32a18cc0a73d 18.0 landed
-
Prevent archive recovery from scanning non-existent WAL files.
- 4bd0ad9e44be 13.0 cited
-
Fix scenario where streaming standby gets stuck at a continuation record.
- 066871980183 11.0 cited
On Fri, Mar 01, 2024 at 01:16:37PM +0900, Kyotaro Horiguchi wrote: > This code intends to prevent a page header error from causing a record > reread, when a record is required to be read from multiple sources. We > could restrict this to only fire at segment boundaries. At segment > boundaries, we won't let LSN back up by using XLP_FIRST_IS_CONTRECORD. > > Having thought up to this point, I now believe that we should > completely prevent LSN from going back in any case. One drawback is > that the fix cannot be back-patched. I don't immediately see why we should not be able to backpatch a fix that restricts the early page header check to happen only at segment boundary when we are in standby mode. Perhaps I'm just missing your point. If we cannot use that, wouldn't it be better just to stick with the proposed check on the TLI and force an error in the page read callback if the situation has changed due to a TLI jump with curFileTLI so as we don't loop and check infinitely these incorrect pages? -- Michael