On 30/10/2026 05:09, shihao zhong wrote:
MultiXactIdCreateFromMembers() inserts the CREATE_ID record before it
fills the SLRU pages. A checkpoint can take its redo pointer in between
and flush the pages first. After a crash, recovery starts after
passing the record and
the multixact has no members. In a non-assert build the old row version
becomes visible again next to the new one.
Good catch. Interesting that we recognized that problem in
TruncateMultiXact(), but missed it in the much more frequently used
MultiXactIdCreateFromMembers() function.
0001 sets DELAY_CHKPT_START around the two steps, like
TruncateMultiXact(). 0002 is the repro.
0001 applies to 15 and up. 14 needs the old delayChkpt flag. The test
needs 18 and up.
I applied the fix down to v14, thanks!
I left out the test, it seemed a bit heavy to memorize forever, this
particular bug seems unlikely to re-appear in exactly the same form, and
injection point tests like this don't generalize well. But thanks for
including it anyway, a repro is always useful even if it doesn't get
included in the regression suite.
- Heikki