RE: libpq debug log

Iwata, Aya <iwata.aya@jp.fujitsu.com>

From: "Iwata, Aya" <iwata.aya@jp.fujitsu.com>
To: 'Jacob Champion' <pchampion@pivotal.io>, 'Jim Doty' <jdoty@pivotal.io>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>, "nagata@sraoss.co.jp" <nagata@sraoss.co.jp>, Tom Lane <tgl@sss.pgh.pa.us>, 'Haribabu Kommi' <kommi.haribabu@gmail.com>, 'Peter Eisentraut' <peter.eisentraut@2ndquadrant.com>
Date: 2018-12-25T04:53:13Z
Lists: pgsql-hackers

Attachments

Hi,

I created v5 patch. Please find attached the patch.

This patch updated following items; 
- Changed "else if" to "if" in traceLog_fprintf(). This means that both PQtrace() and new trace log are set, you can get both log result.
- Implemented loglevel with enum. This change makes it easier if you want to add new log levels.
- Checked http://commitfest.cputube.org/, I modified the code slightly.

I would appreciate if you could review my latest patch.


Regards,
Aya Iwata

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.