Re: BUG #17064: Parallel VACUUM operations cause the error "global/pg_filenode.map contains incorrect checksum"
Heikki Linnakangas <hlinnaka@iki.fi>
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Alexander Lakhin <exclusion@gmail.com>,
PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2021-06-24T08:31:01Z
Lists: pgsql-bugs
On 24/06/2021 11:06, Thomas Munro wrote: > On Thu, Jun 24, 2021 at 7:52 PM Heikki Linnakangas <hlinnaka@iki.fi> wrote: >> On 23/06/2021 12:45, Thomas Munro wrote: >>> On Wed, Jun 23, 2021 at 7:46 PM Heikki Linnakangas <hlinnaka@iki.fi> wrote: >>>> Let's just add the lock there. >>> >>> +1, no doubt about that. >> >> Committed that. Thanks for the report, Alexander! > > I think you missed relmap_redo (including a misleading comment). Fixed, thanks! >> If anyone wants a write a patch for that, I'd be happy to review it. And >> if anyone has access to a system with pmem hardware, it would be >> interesting to try to reproduce a torn sector and broken control file by >> pulling the power plug. > > I have been working on a kind of experimental file system for > simulating torn sectors (and other interesting file system phenomena) > as part of some work on recovery scenerio testing, not quite ready to > share yet but it can simulate that exact failure... Cool! We know what happens if pg_control file is torn, though. What I'd like to know is whether it can happen in practice with pmem, an how likely it is. For curiosity mostly, I think we have already established that it can happen, and it would be nice to protect against it in any case, even if it's rare. - Heikki
Commits
-
Another fix to relmapper race condition.
- 5956795cb5be 9.6.23 landed
- fbbc48995d05 10.18 landed
- eb3bd243a245 11.13 landed
- 8b01a403c5cc 12.8 landed
- 6fb377e5f74b 13.4 landed
- 9b8ed0f52bff 14.0 landed
-
Prevent race condition while reading relmapper file.
- 85ae8ccb2fb3 9.6.23 landed
- a5eacd86b715 10.18 landed
- c78bb32c19fe 11.13 landed
- caac1965077f 12.8 landed
- 2a0ab13f8dd1 13.4 landed
- b6d8d2073f22 14.0 landed