| From: | shihao zhong <zhong950419(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
| Subject: | Data corruption: checkpoint can lose a multixact created during its start |
| Date: | 2026-10-30 03:09:43 |
| Message-ID: | CAGRkXqSuiJ_X4+Z6rsD42pcuACnD9PhoQ-Os+mUJNmJarBWkNg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
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.
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.
Thanks,
Shihao
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0002-Add-test-for-checkpoint-during-multixact-creation.patch | application/octet-stream | 5.2 KB |
| v1-0001-Delay-checkpoint-start-while-creating-a-multixact.patch | application/octet-stream | 1.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Chao Li | 2026-10-30 03:03:44 | Fix error handling in pg_flush_data() and FilePrefetch() |