Re: Add wait event for CommitDelay

From: Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com>
To: Sami Imseih <samimseih(at)gmail(dot)com>
Cc: Ants Aasma <ants(at)cybertec(dot)at>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add wait event for CommitDelay
Date: 2025-12-08 15:20:46
Message-ID: CA+FpmFfrJe44P_BkDOxGoJYadM0zPssHa75Yx3A04r_TUtKzAw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 5 Dec 2025 at 17:15, Sami Imseih <samimseih(at)gmail(dot)com> wrote:

> Hi,
>
> > So, my colleague Ants Aasma found that a wait_event is missing for
> CommitDelay.
> > This just looks like it was missed, please enlighten if it is left out
> intentionally.
>
> I do not know if it was left out intentionally, there are no comments on
> that
> matter.
>
> I am not sure how widely used this GUC is, but from the quick test that I
> did using pgench TPC-B workload with 50 clients, it seems useful
> since a DBA can set commit_delay too high and you will easily observe
> a single backend constantly in this delay which will impact tps.
> It's good to show this clearly as a wait event.
>
> As far as the patch goes, It makes sense to put this under
> "WaitEventTimeout",
> but it should be placed after CHECKPOINT_WRITE_DELAY in
> alphabetical order, and the description could be improved a bit.
> How about? "Waiting for the commit delay before WAL flush."
>
> Thanks for the review of the patch. Please find the attachment for the
updated version.

--
Regards,
Rafia Sabih
CYBERTEC PostgreSQL International GmbH

Attachment Content-Type Size
0002-Add-WAIT_EVENT-for-CommitDelay.patch application/octet-stream 1.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bryan Green 2025-12-08 15:23:00 Re: [PATCH] Allow complex data for GUC extra.
Previous Message Tom Lane 2025-12-08 15:09:15 Re: Simplify the way of appending comma to stringInfo