pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: tsunakawa.takay@fujitsu.com <tsunakawa.takay@fujitsu.com>
Cc: alvherre@alvh.no-ip.org <alvherre@alvh.no-ip.org>
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, 05 Mar 2021 00:55:02 -0500
Message-ID: <1443696.1614923702@sss.pgh.pa.us> (raw)
In-Reply-To: <TYAPR01MB2990D12C5CC3804FF179101EFE969@TYAPR01MB2990.jpnprd01.prod.outlook.com>
References: <1d650278-552a-4bd2-8411-a907fd54446c@www.fastmail.com>
	<TYAPR01MB2990079FEAB4B7592314FD74FE9D9@TYAPR01MB2990.jpnprd01.prod.outlook.com>
	<20210226.161239.974671556832294688.horikyota.ntt@gmail.com>
	<20210226.173032.106337339140685280.horikyota.ntt@gmail.com>
	<TYAPR01MB299093BF0EC723BB12A0349EFE9D9@TYAPR01MB2990.jpnprd01.prod.outlook.com>
	<1425287.1614899023@sss.pgh.pa.us>
	<TYAPR01MB299037962655634FF805BE9BFE969@TYAPR01MB2990.jpnprd01.prod.outlook.com>
	<TYAPR01MB2990D12C5CC3804FF179101EFE969@TYAPR01MB2990.jpnprd01.prod.outlook.com>

"tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com> writes:
> Oops, the logging facility needs the destination (conn->pfdebug).  So, it will be:

>     void pqLogMessage(PGconn *conn, bool toServer);

Right, and it'd need the debug flags too, so +1 for just passing the
PGconn instead of handing those over piecemeal.

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.

			regards, tom lane





view thread (234+ messages)  latest in thread

Message-ID: <1443696.1614923702@sss.pgh.pa.us>
Permalink:  ../1443696.1614923702@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1443696.1614923702@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, tsunakawa.takay@fujitsu.com, alvherre@alvh.no-ip.org, 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: <1443696.1614923702@sss.pgh.pa.us>

* 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