Re: libpq debug log

From: "alvherre(at)alvh(dot)no-ip(dot)org" <alvherre(at)alvh(dot)no-ip(dot)org>
To: "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com>
Cc: 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "iwata(dot)aya(at)fujitsu(dot)com" <iwata(dot)aya(at)fujitsu(dot)com>, "k(dot)jamison(at)fujitsu(dot)com" <k(dot)jamison(at)fujitsu(dot)com>, 'Kyotaro Horiguchi' <horikyota(dot)ntt(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: libpq debug log
Date: 2021-03-05 13:41:09
Message-ID: 20210305134109.GA21852@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021-Mar-05, tsunakawa(dot)takay(at)fujitsu(dot)com wrote:

> From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2021-03-05 13:43:51 Re: n_mod_since_analyze isn't reset at table truncation
Previous Message Michael Banck 2021-03-05 13:16:35 Re: Which PG version does CVE-2021-20229 affected?