Re: pgbench small bug fix

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgbench small bug fix
Date: 2016-03-04 17:41:23
Message-ID: alpine.DEB.2.10.1603041833370.11128@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Alvaro,

>>> Attached is a v3 which test integers more logically. I'm a lazy
>>> programmer who tends to minimize the number of key strokes.
>>
>> Well. From what I can tell this patch is Ready for Committer.
>
> I'm not a fan of this approach either. Would it be too complicated if
> we had a global variable that indicates which thread is the progress
> reporter? We start that with thread 0, but if the reporter thread
> finishes its transactions then it elects some other thread which hasn't
> yet finished. For this to work, each thread would have to maintain in a
> global variable whether it has finished or not.

Hmmm.

Probably it is possible, but it will sure need more that one little
condition to be achieved... I do not think that introducing a non trivial
distributed election algorithm involving locks and so would be a good
decision for this very little matter.

My advice is "keep it simple".

If this is a blocker, I can sure write such an algorithm, when I have some
spare time, but I'm not sure that the purpose is worth it.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-03-04 17:41:45 Re: Way to check whether a particular block is on the shared_buffer?
Previous Message Fabien COELHO 2016-03-04 17:31:59 Re: pgbench stats per script & other stuff