RE: libpq debug log

From: "iwata(dot)aya(at)fujitsu(dot)com" <iwata(dot)aya(at)fujitsu(dot)com>
To: "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com>
Cc: 'Kyotaro Horiguchi' <horikyota(dot)ntt(at)gmail(dot)com>, "k(dot)jamison(at)fujitsu(dot)com" <k(dot)jamison(at)fujitsu(dot)com>, "alvherre(at)alvh(dot)no-ip(dot)org" <alvherre(at)alvh(dot)no-ip(dot)org>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: RE: libpq debug log
Date: 2021-02-22 08:22:02
Message-ID: TY2PR01MB1963731DAE5A7EE4E1B7E55CEA819@TY2PR01MB1963.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Tsunakawa san,

I update patch to v19.

> -----Original Message-----
> From: Tsunakawa, Takayuki/綱川 貴之 <tsunakawa(dot)takay(at)fujitsu(dot)com>
> Sent: Monday, February 22, 2021 1:30 PM
> (52)
> + of tracing. If (<literal>flags</literal> contains
> <literal>PQTRACE_SUPPRESS_TIMESTAMPS</literal>),
>
> () can be removed?

Yes, I removed ().

> (53)
> + int inLogging; /* next byte of
> logging */
>
> I understood this variable contains a position or offset from some place. Then,
> isn't it better to call it LogPos, LogOffset, or LogCursor? I don't think you
> need to prepend "In" as in InCursor, because you don't have to distinguish
> between input and output unlike InCursor in PGconn.

Yes, "In" is from inCursor. I change inLogging to LogCursor because this name easier to understand
the meaning of this parameter.

> (54)
> Can't you restrict the use of the above InLogging in fe-logging.c? How about
> making InLogging mean the offset from InStart, i.e. the offset from the start of
> a message?

I fixed it.
Remove inLogging code from pqCheckInBufferSpace() and pqReadData().
And LogCursor remember the difference between conn->inCursor and conn->inStart.

And 3 bugs I noted February 2nd email are all fixed.
> 1. fix 3 bugs
> 1.1 -1 output in "Query" message
> 1.2 two message output in "ReadyForQuery" message
> 1.3 "StartupMessage" output as " UnknownMessage "

If you want to know how to fix there bugs, please see my email;
> Sent: Monday, February 8, 2021 11:58 PM

Regards,
Aya Iwata
Fujitsu

Attachment Content-Type Size
v19-0001-libpq-trace.patch application/octet-stream 32.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Markus Wanner 2021-02-22 08:25:17 Re: repeated decoding of prepared transactions
Previous Message Justin Pryzby 2021-02-22 08:03:45 Re: doc review for v14