Re: Assertion failure in pgbench

Fujii Masao <masao.fujii@gmail.com>

From: Fujii Masao <masao.fujii@gmail.com>
To: Tatsuo Ishii <ishii@postgresql.org>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2025-07-31T15:25:14Z
Lists: pgsql-hackers

Attachments

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.


> Correction. That would not be a proper fix. Just removing inner
> PQgetResult and the Assert is enough?

Could you explain why you think repeatedly calling PQgetResult
until it returns NULL isn't the right fix?

Regards,

-- 
Fujii Masao

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix assertion failure in pgbench when handling multiple pipeline sync messages.