Re: USE_BARRIER_SMGRRELEASE on Linux?
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Thomas Munro <thomas.munro@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-02-16T06:14:04Z
Lists: pgsql-hackers
On Tue, Feb 15, 2022 at 09:06:45PM -0800, Andres Freund wrote: > On 2022-02-15 20:59:11 -0800, Nathan Bossart wrote: >> On Wed, Feb 16, 2022 at 03:34:08PM +1300, Thomas Munro wrote: >> > So it's not getting unlinked until the *next* checkpoint cycle. I >> > don't know why. >> >> On my machine (5.11.0-43), it looks like the test starts failing after >> cc50080. That commit adjusted some regression tests, so I'm assuming it's >> not the root cause. > > That makes some sense. Before that we didn't create database objects before > tablespace.sql. A scheduling like this that could make some pre-existing > issues much more visible. > > I think we also saw the windows drop tablespace issues less commonly than > recently (outside the aio tree at least)... It looks like register_unlink_segment() is called prior to the checkpoint, but the checkpointer is not calling RememberSyncRequest() until after SyncPreCheckpoint(). This means that the requests are registered with the next checkpoint cycle count, so they aren't processed until the next checkpoint. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
Commits
-
Fix race between DROP TABLESPACE and checkpointing.
- fe197872cfe8 10.21 landed
- ca522c60a5db 11.16 landed
- c918f07dd479 12.11 landed
- 51e760e5a667 13.7 landed
- 26e007939809 14.3 landed
- 46d9bfb0a68f 15.0 landed