From: | "k(dot)jamison(at)fujitsu(dot)com" <k(dot)jamison(at)fujitsu(dot)com> |
---|---|
To: | "'alvherre(at)alvh(dot)no-ip(dot)org'" <alvherre(at)alvh(dot)no-ip(dot)org>, "iwata(dot)aya(at)fujitsu(dot)com" <iwata(dot)aya(at)fujitsu(dot)com> |
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 04:04:04 |
Message-ID: | OSBPR01MB2341D8A89B3AF2D98C699393EF9F9@OSBPR01MB2341.jpnprd01.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> From: alvherre(at)alvh(dot)no-ip(dot)org <alvherre(at)alvh(dot)no-ip(dot)org>
> I'll give this another look tomorrow, but I wanted to pass along that I prefer
> libpq-trace.{c,h} instead of libpq-logging. I also renamed variable "pin" and
> pgindented. I don't have any major reservations about this patch now, so I'll
> mark it ready-for-committer in case somebody else wants to have a look
> before push.
>
> (Not sure about the use of the word "forcely")
Hi Iwata-san and Alvaro-san,
Thank you for updating the patch.
Although it's already set as "Ready for Committer", I just found minor parts
that need to be fixed.
(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."
(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."
(3) +PQtraceSetFlags(PGconn *conn, int flags)
+ /* If PQtrace() is failed, do noting. */
"If PQtrace() failed, do nothing."
(4)
> (Not sure about the use of the word "forcely")
I think it's not necessary.
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).
Regards,
Kirk Jamison
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2021-02-24 04:11:51 | Re: Parallel INSERT (INTO ... SELECT ...) |
Previous Message | Fujii Masao | 2021-02-24 03:59:34 | Re: [PATCH] Feature improvement for TRUNCATE tab completion. |