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 1lRk98-0004TN-Bi for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Mar 2021 23:21:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lRk97-0004d8-76 for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Mar 2021 23:21:09 +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 1lRk96-0004d1-8y for pgsql-hackers@lists.postgresql.org; Wed, 31 Mar 2021 23:21:09 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lRk91-0007RY-Sb for pgsql-hackers@lists.postgresql.org; Wed, 31 Mar 2021 23:21:07 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id B37C62BD3; Wed, 31 Mar 2021 19:20:59 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 31 Mar 2021 19:21:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=pI0Y9jA0u/lM9BMJgB8ysNv5aZkPluLt9H6N9BzJyr0=; b=cj7cqQXy 0YNl5vAghdDh12uL+hLCBangXnEHtnnVadQB5U1ZfLp2ZZKBC1vwkR77wwSVPW3g uzc5oRvrzr2ygX1RIMEZl7Ai3ZyIMcss4+tYFPhr7AjFjdjtHyRKb2bU0PyUAvPp ji7USl5YYXPLJvnoFQKrLCcK5QvKwxWOqP61dzr5Fgjm7ZY9I1d0KAzWZEXNYPpC lp/y3iPBwjQF96fQoH0uAf9AK3tcz2Vbn3m/2vZPNkep1fo5Q0yL/v6Ql40LbCe6 2ZnbU5k0m+1uevw22mvWuRTsSAdoeCCLToWj5M/j//O01ntvUtlCbMmFNAXKvKRz OxuCc2Z1FEpGDg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudeifedgudelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne goteeftdelqddtudculddvtddmnecujfgurhepfffhvffukfggtggugfgjfgesthekredt tderudenucfhrhhomhepfddkrghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh dkfdcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqeenucggtffrrght thgvrhhnpefgheeggfdtteegtdeviefgfffhtdefvdejkeefvdevtdfhffefkeehvdelfe dvtdenucffohhmrghinhepmhhitghrohhsohhfthdrtghomhenucfkphepudeltddrleeh rdduledrleehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.95]) by mail.messagingengine.com (Postfix) with ESMTPA id 29E2624005C; Wed, 31 Mar 2021 19:20:58 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 744FE2A0BBB; Wed, 31 Mar 2021 20:20:55 -0300 (-03) Date: Wed, 31 Mar 2021 20:20:55 -0300 From: "'alvherre@alvh.no-ip.org'" To: Tom Lane 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 Message-ID: <20210331232055.GA3874@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3337422.1617229905@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Mar-31, Tom Lane wrote: > While this may have little to do with drongo's issue, > I'm going to take exception to this bit that I see that > the patch added to PQtrace(): > > /* Make the trace stream line-buffered */ > setvbuf(debug_port, NULL, _IOLBF, 0); Mea culpa. I added this early on because it made PQtrace's use more comfortable, but I agree that it's a mistake. Removed. I put it in libpq_pipeline.c instead. > ... and as for an actual explanation for drongo's issue, > I'm sort of wondering why libpq_pipeline.c is opening the > trace file in "w+" mode rather than vanilla "w" mode. > That seems unnecessary, and maybe it doesn't work so well > on Windows. well, at least the MSVC documentation claims that it works, but who knows. I removed that too. https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/fopen-wfopen?view=msvc-160 -- Álvaro Herrera Valdivia, Chile