Re: An improvement of ProcessTwoPhaseBuffer logic
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Vitaly Davydov <v.davydov@postgrespro.ru>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-12-26T05:34:48Z
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 →
-
Integrate FullTransactionIds deeper into two-phase code
- 62a17a92833d 19 (unreleased) landed
-
Merge copies of converting an XID to a FullTransactionId.
- 1587f7b9fc1a 17.3 landed
- 81772a495ec9 18.0 landed
-
Revert recent changes related to handling of 2PC files at recovery
- 4d6d7bdc0642 13.19 landed
- 060f9f5ea537 14.16 landed
- 42c900d31e57 15.11 landed
- 4d72357c40ee 16.7 landed
- d1bf86a62211 17.3 landed
- a6c70f68cdeb 18.0 landed
-
Fix failures with incorrect epoch handling for 2PC files at recovery
- c3de0f9eed38 17.3 landed
- 7e125b20eed6 18.0 landed
Attachments
- v1-0001-Fix-failure-with-incorrect-epoch-for-future-2PC-f.patch (text/x-diff) patch v1-0001
- v1-0002-Fix-handling-of-orphaned-2PC-files-in-the-future-.patch (text/x-diff) patch v1-0002
- v1-0002-Fix-handling-of-orphaned-2PC-files-in-the-fut-v16.patch (text/x-diff) patch v1-0002
On Thu, Dec 26, 2024 at 07:42:34AM +0900, Michael Paquier wrote: > I suspect that this can be still dangerous as-is while complicating > the code with more possible paths for the removal of the 2PC files, > because we may still build a file name from an XID, and that's what's > causing this issue.. Here are two patches to address both issues: - 0001 for the epoch calculation, down to 17, which would take care of the underflow problem when having a 2PC file that has an XID in the future at epoch 0. It is true that it could be smarter when dealing with files from other epochs, and that this is a problem in v17~. I think that this should integrate better with FullTransactionIds moving forward rather than pass the file names. That would be something quite invasive, only for HEAD. At least that's my impression. - 0002, to take care of the future file issue, down to 13. This includes a TAP test to demonstrate the problem. The test needs a tweak for the 2PC file name in v17~. -- Michael