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