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