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: tsunakawa.takay@fujitsu.com <tsunakawa.takay@fujitsu.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: iwata.aya@fujitsu.com <iwata.aya@fujitsu.com>
Cc: k.jamison@fujitsu.com <k.jamison@fujitsu.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>
Subject: Re: libpq debug log
Date: Fri, 5 Mar 2021 10:41:09 -0300
Message-ID: <20210305134109.GA21852@alvherre.pgsql> (raw)
In-Reply-To: <TYAPR01MB2990065BA2D1E35657516C10FE969@TYAPR01MB2990.jpnprd01.prod.outlook.com>

On 2021-Mar-05, tsunakawa.takay@fujitsu.com wrote:

> From: Tom Lane <tgl@sss.pgh.pa.us>
> > But I think passing the message start address explicitly might be
> > better than having it understand the buffering behavior in enough
> > detail to know where to find the message.  Part of the point here
> > (IMO) is to decouple the tracing logic from the core libpq logic, in
> > hopes of not having common-mode bugs.
> 
> Ouch, you're perfectly right.  Then let's make the signature:
> 
>     void pqLogMessage(PGconn *conn, const char *message, bool toServer);

Yeah, looks good!  I agree that going this route will result in more
trustworthy trace output.

-- 
Álvaro Herrera                            39°49'30"S 73°17'W





view thread (234+ messages)  latest in thread

Message-ID: <20210305134109.GA21852@alvherre.pgsql>
Permalink:  ../20210305134109.GA21852@alvherre.pgsql/
Also on:    postgresql.org/message-id/20210305134109.GA21852@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, tsunakawa.takay@fujitsu.com, tgl@sss.pgh.pa.us, iwata.aya@fujitsu.com, k.jamison@fujitsu.com, horikyota.ntt@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: libpq debug log
  In-Reply-To: <20210305134109.GA21852@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