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 1lRjBt-0001Es-TU for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Mar 2021 22:19:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lRjBs-0000I2-H6 for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Mar 2021 22:19:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lRjBs-0000Hr-A9 for pgsql-hackers@lists.postgresql.org; Wed, 31 Mar 2021 22:19:56 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lRjBq-0003FL-9i for pgsql-hackers@lists.postgresql.org; Wed, 31 Mar 2021 22:19:55 +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 12VMJkFS3336856; Wed, 31 Mar 2021 18:19:46 -0400 From: Tom Lane To: "'alvherre@alvh.no-ip.org'" cc: "iwata.aya@fujitsu.com" , "tsunakawa.takay@fujitsu.com" , "'Kyotaro Horiguchi'" , "k.jamison@fujitsu.com" , "pgsql-hackers@lists.postgresql.org" , Andrew Dunstan Subject: Re: libpq debug log In-reply-to: <20210331220920.GA23882@alvherre.pgsql> References: <20210331220920.GA23882@alvherre.pgsql> Comments: In-reply-to "'alvherre@alvh.no-ip.org'" message dated "Wed, 31 Mar 2021 19:09:20 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3336854.1617229186.1@sss.pgh.pa.us> Date: Wed, 31 Mar 2021 18:19:46 -0400 Message-ID: <3336855.1617229186@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "'alvherre@alvh.no-ip.org'" writes: > On 2021-Mar-31, Tom Lane wrote: >> So for some reason, opening the trace file fails. >> (I wonder why we don't see an error message for this though.) > .. oh, I think we forgot to set conn->Pfdebug = NULL when creating the > connection. So when we do PQtrace(), the first thing it does is > PQuntrace(), and then that tries to do fflush(conn->Pfdebug) ---> crash. > So this should fix it. Nope, see the MemSet a few lines further up. This change seems like good style, but it won't fix anything --- else we'd have been having issues with the pre-existing trace logic. What I suspect is some Windows dependency in the way that 001_libpq_pipeline.pl is setting up the trace output files. cc'ing Andrew to see if he has any ideas. regards, tom lane