pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Marina Polyakova <m.polyakova@postgrespro.ru>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: kuroda.hayato@fujitsu.com, David Rowley <dgrowleyml@gmail.com>
Subject: Re: pgbench: option delaying queries till connections establishment?
Date: Fri, 12 Mar 2021 21:46:46 -0500
Message-ID: <2568537.1615603606@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+hUKGKrbv8RcfVenoXA31ZmCa-f9qDaKfVg5pFUCmHeecdWsQ@mail.gmail.com>
References: <20200227180100.zyvjwzcpiokfsqm2@alap3.anarazel.de>
	<alpine.DEB.2.22.394.2011021726390.989361@pseudo>
	<OSBPR01MB3157A7306BFF163490ED837BF5ED0@OSBPR01MB3157.jpnprd01.prod.outlook.com>
	<alpine.DEB.2.22.394.2011062034410.1605435@pseudo>
	<OSBPR01MB3157F335F242DBCDBC09DF82F5E80@OSBPR01MB3157.jpnprd01.prod.outlook.com>
	<alpine.DEB.2.22.394.2011111316540.3832060@pseudo>
	<OSBPR01MB3157D2C741ED22422E0FF9E6F5E60@OSBPR01MB3157.jpnprd01.prod.outlook.com>
	<0a8fa6ea18ef6e1a336fbcc721931928@postgrespro.ru>
	<alpine.DEB.2.22.394.2011141609050.1129903@pseudo>
	<CA+hUKG+it0+GZEZdP55fKQBuKZmu4OfXfW=qZFh7JgwVccMxCw@mail.gmail.com>
	<alpine.DEB.2.22.394.2101012114050.3573723@pseudo>
	<CA+hUKG+q_TWQgrvtfHxJoWyr1DVz_WhQBr3LjfiJMKE=V+qDFw@mail.gmail.com>
	<alpine.DEB.2.22.394.2101022148070.3573723@pseudo>
	<CA+hUKG+X+vBSJAsSLYNRVbNLXVoTC7UjaiD09ij3wY1-qakMTw@mail.gmail.com>
	<CA+hUKGJgFZmchtseDs7B9ptxWU_aHZr2KU4dprga_Rbg-TSmnw@mail.gmail.com>
	<alpine.DEB.2.22.394.2101300949420.11664@pseudo>
	<C! A+hUKG+VSOYLmPS5yE5jzWV_FxC=4ZnqsMF6TJ2ATVzuROewJg@mail.gmail.com>
	<CA+hUKGK_Ggd-Via6Y3swER_wqQwWiWGhUtN5U=a5hC3be1NN0g@mail.gmail.com>
	<CA+hUKG+nbQC9A38Z5OrYdoD1rsJbrxJN5Z8ptiRkqWeawPn3Ag@mail.gmail.com>
	<CA+hUKGLjPixrEjvsHggGL_huQ9Jg0bsjp7zpztEG=_DSRGrs+Q@mail.gmail.com>
	<CA+hUKGKrbv8RcfVenoXA31ZmCa-f9qDaKfVg5pFUCmHeecdWsQ@mail.gmail.com>

Thomas Munro <thomas.munro@gmail.com> writes:
> On Mon, Mar 8, 2021 at 3:18 PM Thomas Munro <thomas.munro@gmail.com> wrote:
>> David Rowley kindly tested this for me on Windows and told me how to
>> fix one of the macros that had incorrect error checking on that OS.
>> So here's a new version.  I'm planning to commit 0001 and 0002 soon,
>> if there are no objections.  0003 needs some more review.

> I made a few mostly cosmetic changes, pgindented and pushed all these patches.

So, gaur is not too happy with this:

ccache gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -O2 -I../../src/port -DFRONTEND -I../../src/include  -D_USE_CTYPE_MACROS -D_XOPEN_SOURCE_EXTENDED  -I/usr/local/libxml2-2.6.23/include/libxml2 -I/usr/local/ssl-1.0.1e/include  -c -o strlcat.o strlcat.c
pthread_barrier_wait.c: In function 'pthread_barrier_init':
pthread_barrier_wait.c:24:2: error: incompatible type for argument 2 of 'pthread_cond_init'
/usr/include/pthread.h:378:5: note: expected 'pthread_condattr_t' but argument is of type 'void *'
pthread_barrier_wait.c:26:2: error: incompatible type for argument 2 of 'pthread_mutex_init'
/usr/include/pthread.h:354:5: note: expected 'pthread_mutexattr_t' but argument is of type 'void *'
make[2]: *** [pthread_barrier_wait.o] Error 1

Checking the man pages, it seems that this ancient HPUX version
is using some pre-POSIX API spec in which pthread_cond_init takes a
pthread_condattr_t rather than a pointer to pthread_condattr_t.
Similarly for pthread_mutex_init.

While it's likely that we could work around that, it's my
opinion that we shouldn't have to, because gaur is building with
--disable-thread-safety.  If that switch has any meaning at all,
it should be that we don't try to use thread infrastructure.
Was any thought given to being able to opt out of this patchset
to support that configure option?

			regards, tom lane





view thread (54+ messages)  latest in thread

Message-ID: <2568537.1615603606@sss.pgh.pa.us>
Permalink:  ../2568537.1615603606@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2568537.1615603606@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, thomas.munro@gmail.com, coelho@cri.ensmp.fr, m.polyakova@postgrespro.ru, dgrowleyml@gmail.com
  Subject: Re: pgbench: option delaying queries till connections establishment?
  In-Reply-To: <2568537.1615603606@sss.pgh.pa.us>
  References: <20200227180100.zyvjwzcpiokfsqm2@alap3.anarazel.de> <OSBPR01MB3157D2C741ED22422E0FF9E6F5E60@OSBPR01MB3157.jpnprd01.prod.outlook.com> <0a8fa6ea18ef6e1a336fbcc721931928@postgrespro.ru> <alpine.DEB.2.22.394.2011141609050.1129903@pseudo> <CA+hUKG+it0+GZEZdP55fKQBuKZmu4OfXfW=qZFh7JgwVccMxCw@mail.gmail.com> <alpine.DEB.2.22.394.2101012114050.3573723@pseudo> <CA+hUKG+q_TWQgrvtfHxJoWyr1DVz_WhQBr3LjfiJMKE=V+qDFw@mail.gmail.com> <alpine.DEB.2.22.394.2101022148070.3573723@pseudo> <CA+hUKG+X+vBSJAsSLYNRVbNLXVoTC7UjaiD09ij3wY1-qakMTw@mail.gmail.com> <CA+hUKGJgFZmchtseDs7B9ptxWU_aHZr2KU4dprga_Rbg-TSmnw@mail.gmail.com> <alpine.DEB.2.22.394.2101300949420.11664@pseudo> <CA+hUKGK_Ggd-Via6Y3swER_wqQwWiWGhUtN5U=a5hC3be1NN0g@mail.gmail.com> <CA+hUKG+nbQC9A38Z5OrYdoD1rsJbrxJN5Z8ptiRkqWeawPn3Ag@mail.gmail.com> <CA+hUKGLjPixrEjvsHggGL_huQ9Jg0bsjp7zpztEG=_DSRGrs+Q@mail.gmail.com> <CA+hUKGKrbv8RcfVenoXA31ZmCa-f9qDaKfVg5pFUCmHeecdWsQ@mail.gmail.com> <2568537.1615603606@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox