Re: Avoid stuck of pbgench due to skipped transactions

From: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Avoid stuck of pbgench due to skipped transactions
Date: 2021-06-14 02:20:37
Message-ID: 20210614112037.b2963e40ac0a2031a7a9983d@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Fabien,

On Sun, 13 Jun 2021 08:56:59 +0200 (CEST)
Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> wrote:

> > I attached a patch for this fix.
>
> The patch mostly works for me, and I agree that the bench should not be in
> a loop on any parameters, even when "crazy" parameters are given…
>
> However I'm not sure this is the right way to handle this issue.
>
> The catch-up loop can be dropped and the automaton can loop over itself to
> reschedule. Doing that as the attached fixes this issue and also makes
> progress reporting work proprely in more cases, and reduces the number of
> lines of code. I did not add a test case because time sensitive tests have
> been removed (which is too bad, IMHO).

I agree with your way to fix. However, the progress reporting didn't work
because we cannot return from advanceConnectionState to threadRun and just
break the loop.

+ /* otherwise loop over PREPARE_THROTTLE */
break;

I attached the fixed patch that uses return instead of break, and I confirmed
that this made the progress reporting work property.

Regards,
Yugo Nagata

--
Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>

Attachment Content-Type Size
pgbench-stuck-3.patch text/x-diff 1.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2021-06-14 02:28:50 Re: An out-of-date comment in nodeIndexonlyscan.c
Previous Message tsunakawa.takay@fujitsu.com 2021-06-14 02:04:31 RE: Transactions involving multiple postgres foreign servers, take 2