Re: Assertion failure in pgbench - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Assertion failure in pgbench
Date
Msg-id CAHGQGwHnCKO3JM7ePq4rigSqKHoGFO-NvLg7DrukcWgr2RZ=iw@mail.gmail.com
Whole thread Raw
In response to Re: Assertion failure in pgbench  (Tatsuo Ishii <ishii@postgresql.org>)
Responses Re: Assertion failure in pgbench
List pgsql-hackers
On Fri, Aug 1, 2025 at 9:03 AM Tatsuo Ishii <ishii@postgresql.org> wrote:
>
> > On Thu, Jul 31, 2025 at 11:03 AM Tatsuo Ishii <ishii@postgresql.org> wrote:
> >> > Yes. When an error occurs and an error response message returned from
> >> > backend, pgbench will send one more sync message, then sends ROLLBACK
> >> > if necessary. I think the code above should be changed to call
> >> > PQgetResult repeatably until it returns NULL.
> >
> > I was thinking the same. The attached patch implements that approach,
> > and it seems to eliminate the assertion failure.
>
> The patch looks good to me and I confirmed it fixes the the assertion
> failure.

Thanks for the review and testing!

I've updated the commit message and attached a revised version of the patch.

This assertion failure can occur when retriable errors (like
serialization errors) happen while using pipeline mode. Since
this issue exists from v15 onward, the fix should be back-patched
to v15. I’ve also attached a version of the patch that applies
cleanly to v15 and v16, as the master patch doesn’t apply cleanly
to those branches.

Unless there are any objections, I plan to commit this and
back-patch to v15.

Regards,

--
Fujii Masao

Attachment

pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: Conflict detection for update_deleted in logical replication
Next
From: Andrei Lepikhov
Date:
Subject: Correction of RowMark Removal During Sel-Join Elimination