Thread

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add wait event for the group commit delay before WAL flush

  1. Add wait event for CommitDelay

    Rafia Sabih <rafia.pghackers@gmail.com> — 2025-12-05T10:10:34Z

    Hello there,
    
    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.
    For now, I worked on this patch to add it.
    
    -- 
    Regards,
    Rafia Sabih
    CYBERTEC PostgreSQL International GmbH
    
  2. Re: Add wait event for CommitDelay

    Sami Imseih <samimseih@gmail.com> — 2025-12-05T16:15:19Z

    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."
    
    --
    Sami Imseih
    Amazon Web Services (AWS)
    
    
    
    
  3. Re: Add wait event for CommitDelay

    Michael Paquier <michael@paquier.xyz> — 2025-12-05T22:19:24Z

    On Fri, Dec 05, 2025 at 10:15:19AM -0600, Sami Imseih wrote:
    > 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.
    
    I have never used it myself, but I can see why it could be useful for
    monitoring here.  No objections to this addition here. 
    
    > 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."
    
    Yes, your description is more useful than what the patch is proposing.
    --
    Michael
    
  4. Re: Add wait event for CommitDelay

    Rafia Sabih <rafia.pghackers@gmail.com> — 2025-12-08T15:20:46Z

    On Fri, 5 Dec 2025 at 17:15, Sami Imseih <samimseih@gmail.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
    
  5. Re: Add wait event for CommitDelay

    Sami Imseih <samimseih@gmail.com> — 2025-12-08T19:16:28Z

    > Thanks for the review of the patch. Please find the attachment for the updated version.
    
    Thanks! v2 LGTM
    
    --
    Sami Imseih
    Amazon Web Services (AWS)
    
    
    
    
  6. Re: Add wait event for CommitDelay

    Heikki Linnakangas <hlinnaka@iki.fi> — 2025-12-09T15:23:11Z

    On 08/12/2025 21:16, Sami Imseih wrote:
    >> Thanks for the review of the patch. Please find the attachment for the updated version.
    > 
    > Thanks! v2 LGTM
    
    Committed, thanks!
    
    - Heikki