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

From Fujii Masao
Subject Re: Assertion failure in pgbench
Date
Msg-id CAHGQGwHJvog9VquDa2Bvi61Q7z4xiQhh5df508f-K3WHS2SzAA@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 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

Attachment

pgsql-hackers by date:

Previous
From: Sami Imseih
Date:
Subject: Re: track generic and custom plans in pg_stat_statements
Next
From: Yugo Nagata
Date:
Subject: Re: Allow to collect statistics on virtual generated columns