Re: pgbench: option delaying queries till connections establishment?

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>, Marina Polyakova <m.polyakova@postgrespro.ru>, pgsql-hackers <pgsql-hackers@postgresql.org>, kuroda.hayato@fujitsu.com, David Rowley <dgrowleyml@gmail.com>
Date: 2021-03-13T03:08:55Z
Lists: pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes:
> On Sat, Mar 13, 2021 at 3:47 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Was any thought given to being able to opt out of this patchset
>> to support that configure option?

> Oops.  The pgbench code was tested under --disable-thread-safety, but
> it didn't occur to me that the AC_REPLACE_FUNCS search for
> pthread_barrier_wait should also be conditional on that; I will now go
> and try to figure out how to do that.

OK, cool.  I don't think it's hard, just do

if test "$enable_thread_safety" = yes; then
  AC_REPLACE_FUNCS(pthread_barrier_wait)
fi

Probably this check should be likewise conditional:

AC_SEARCH_LIBS(pthread_barrier_wait, pthread)

			regards, tom lane



Commits

  1. Fix new pthread code to respect --disable-thread-safety.

  2. Add missing pthread_barrier_t.

  3. pgbench: Improve time logic.

  4. pgbench: Refactor thread portability support.

  5. pgbench: Synchronize client threads.

  6. Fix bogus logic for skipping unnecessary partcollation dependencies.