RE: libpq debug log

From: "iwata(dot)aya(at)fujitsu(dot)com" <iwata(dot)aya(at)fujitsu(dot)com>
To: "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>
Cc: "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(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-02-24 10:28:39
Message-ID: TYAPR01MB196560A8812E5012149487BDEA9F9@TYAPR01MB1965.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Kirk san,

Thank you for your review. I update patch to v21.

> -----Original Message-----
> From: Jamison, Kirk/ジャミソン カーク <k(dot)jamison(at)fujitsu(dot)com>
> Sent: Wednesday, February 24, 2021 1:04 PM

> (1) Doc: PQtraceSetFlags
> + <literal>flags</literal> contains flag bits describing the operating
> mode
> + of tracing. If <literal>flags</literal> contains
> <literal>PQTRACE_SUPPRESS_TIMESTAMPS</literal>,
> + then timestamp is not printed with each message. If set to 0
> (default),tracing will be output with timestamp.
> + This function should be called after calling
> <function>PQtrace</function>.
>
> Missing space. And can be paraphrased to:
> "If set to 0 (default), tracing with timestamp is printed."

I fixed this documentation as you suggested.

> (2)
> + * pqTraceMaybeBreakLine:
> + * Check whether the backend message is complete. If so, print
> a line
> + * break and reset the buffer. If print break line, return 1.
>
> The 2nd & last sentence can be combined to "If so, print a line break, reset
> the buffer, and return 1."

I fixed it because it is more natural than previous explanation.

> (3) +PQtraceSetFlags(PGconn *conn, int flags)
> + /* If PQtrace() is failed, do noting. */
>
> "If PQtrace() failed, do nothing."

I fixed it.


> (4)
> > (Not sure about the use of the word "forcely")
>
> I think it's not necessary.

Sure.

> Also, I tested the flag to not print timestamp. For example,
> PQtrace(conn, trace_file);
> PQtraceSetFlags(conn, PQTRACE_SUPPRESS_TIMESTAMPS);
>
> And it did not print the timestamp. So it worked.
> It also passed all the regression tests. (although PQtrace() is not tested in
> existing libpq tests).

Thank you for your test.

Regards,
Aya Iwata
Fujitsu

Attachment Content-Type Size
v21-0001-libpq-trace.patch application/octet-stream 32.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Nancarrow 2021-02-24 11:00:04 Re: Parallel INSERT (INTO ... SELECT ...)
Previous Message Dilip Kumar 2021-02-24 09:55:57 Re: Is Recovery actually paused?