pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: 'alvherre@alvh.no-ip.org' <alvherre@alvh.no-ip.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: iwata.aya@fujitsu.com <iwata.aya@fujitsu.com>
Cc: tsunakawa.takay@fujitsu.com <tsunakawa.takay@fujitsu.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: k.jamison@fujitsu.com <k.jamison@fujitsu.com>
Cc: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>
Cc: Andrew Dunstan <andrew@dunslane.net>
Subject: Re: libpq debug log
Date: Wed, 31 Mar 2021 20:20:55 -0300
Message-ID: <20210331232055.GA3874@alvherre.pgsql> (raw)
In-Reply-To: <3337422.1617229905@sss.pgh.pa.us>

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





view thread (234+ messages)  latest in thread

Message-ID: <20210331232055.GA3874@alvherre.pgsql>
Permalink:  ../20210331232055.GA3874@alvherre.pgsql/
Also on:    postgresql.org/message-id/20210331232055.GA3874@alvherre.pgsql

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, tgl@sss.pgh.pa.us, iwata.aya@fujitsu.com, tsunakawa.takay@fujitsu.com, horikyota.ntt@gmail.com, k.jamison@fujitsu.com, pgsql-hackers@lists.postgresql.org, andrew@dunslane.net
  Subject: Re: libpq debug log
  In-Reply-To: <20210331232055.GA3874@alvherre.pgsql>

* 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