Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lKuJH-0006W8-J0 for pgsql-hackers@arkaria.postgresql.org; Sat, 13 Mar 2021 02:47:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lKuJE-0000rq-Qy for pgsql-hackers@arkaria.postgresql.org; Sat, 13 Mar 2021 02:47:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lKuJE-0000ku-Jb for pgsql-hackers@lists.postgresql.org; Sat, 13 Mar 2021 02:47:20 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lKuJA-0001Pg-Bj for pgsql-hackers@postgresql.org; Sat, 13 Mar 2021 02:47:18 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 12D2kkWR2568538; Fri, 12 Mar 2021 21:46:46 -0500 From: Tom Lane To: Thomas Munro cc: Fabien COELHO , Marina Polyakova , pgsql-hackers , kuroda.hayato@fujitsu.com, David Rowley Subject: Re: pgbench: option delaying queries till connections establishment? In-reply-to: References: <20200227180100.zyvjwzcpiokfsqm2@alap3.anarazel.de> <0a8fa6ea18ef6e1a336fbcc721931928@postgrespro.ru> Comments: In-reply-to Thomas Munro message dated "Wed, 10 Mar 2021 17:54:41 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2568536.1615603606.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 12 Mar 2021 21:46:46 -0500 Message-ID: <2568537.1615603606@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thomas Munro writes: > On Mon, Mar 8, 2021 at 3:18 PM Thomas Munro wro= te: >> 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 pa= tches. So, gaur is not too happy with this: ccache gcc -std=3Dgnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdecla= ration-after-statement -Werror=3Dvla -Wendif-labels -Wmissing-format-attri= bute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=3Ds= tandard -g -O2 -I../../src/port -DFRONTEND -I../../src/include -D_USE_CTY= PE_MACROS -D_XOPEN_SOURCE_EXTENDED -I/usr/local/libxml2-2.6.23/include/li= bxml2 -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 'p= thread_cond_init' /usr/include/pthread.h:378:5: note: expected 'pthread_condattr_t' but argu= ment is of type 'void *' pthread_barrier_wait.c:26:2: error: incompatible type for argument 2 of 'p= thread_mutex_init' /usr/include/pthread.h:354:5: note: expected 'pthread_mutexattr_t' but arg= ument 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