Re: Assertion failure in pgbench

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: masao(dot)fujii(at)gmail(dot)com
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Assertion failure in pgbench
Date: 2025-08-01 00:03:21
Message-ID: 20250801.090321.1587035501277542559.ishii@postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Thu, Jul 31, 2025 at 11:03 AM Tatsuo Ishii <ishii(at)postgresql(dot)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.

>> 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?

Sorry, that was my thinko. I should have had more coffee.
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2025-08-01 00:19:23 Cannot login CommitFests due to cool-off period
Previous Message Michael Paquier 2025-07-31 23:40:33 Re: Convert varatt.h macros to static inline functions