Re: USE_BARRIER_SMGRRELEASE on Linux? - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: USE_BARRIER_SMGRRELEASE on Linux?
Date
Msg-id 20220216061404.GA2813338@nathanxps13
Whole thread Raw
In response to Re: USE_BARRIER_SMGRRELEASE on Linux?  (Andres Freund <andres@anarazel.de>)
Responses Re: USE_BARRIER_SMGRRELEASE on Linux?  (Nathan Bossart <nathandbossart@gmail.com>)
List 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



pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: Adding CI to our tree
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: Race conditions in 019_replslot_limit.pl