RE: libpq debug log

tsunakawa.takay@fujitsu.com <tsunakawa.takay@fujitsu.com>

From: "tsunakawa.takay@fujitsu.com" <tsunakawa.takay@fujitsu.com>
To: "iwata.aya@fujitsu.com" <iwata.aya@fujitsu.com>
Cc: 'Kyotaro Horiguchi' <horikyota.ntt@gmail.com>, "k.jamison@fujitsu.com" <k.jamison@fujitsu.com>, "alvherre@alvh.no-ip.org" <alvherre@alvh.no-ip.org>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2021-02-22T04:30:27Z
Lists: pgsql-hackers
From: Iwata, Aya/岩田 彩 <iwata.aya@fujitsu.com>
> I update patch to v18. It has been fixed in response to Tsunakawa san's review.

(52)
+      of tracing.  If (<literal>flags</literal> contains <literal>PQTRACE_SUPPRESS_TIMESTAMPS</literal>),

() can be 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.


(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?



Regards
Takayuki Tsunakawa




Commits

  1. Rename PQtraceSetFlags() to PQsetTraceFlags().

  2. Suppress length of Notice/Error msgs in PQtrace regress mode

  3. Strip file names reported in error messages on Windows, too.

  4. Fix setvbuf()-induced crash in libpq_pipeline

  5. libpq_pipeline: Must strdup(optarg) to avoid crash

  6. Remove setvbuf() call from PQtrace()

  7. Initialize conn->Pfdebug to NULL when creating a connection

  8. Disable force_parallel_mode in libpq_pipeline

  9. libpq_pipeline: add PQtrace() support and tests

  10. Improve PQtrace() output format

  11. Re-simplify management of inStart in pqParseInput3's subroutines.