Re: USE_BARRIER_SMGRRELEASE on Linux?

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: USE_BARRIER_SMGRRELEASE on Linux?
Date: 2022-02-16 06:57:32
Message-ID: 20220216065732.GA2932808@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 15, 2022 at 10:14:04PM -0800, Nathan Bossart wrote:
> 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.

Calling AbsorbSyncRequests() before advancing the checkpoint cycle counter
seems to fix the issue. However, this requires moving SyncPreCheckpoint()
out of the critical section in CreateCheckPoint(). Patch attached.

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v1-0001-call-AbsorbSyncRequests-before-advancing-checkpoi.patch text/x-diff 2.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2022-02-16 07:10:27 Re: Observability in Postgres
Previous Message Andres Freund 2022-02-16 06:42:09 Re: Adding CI to our tree