Re: libpq debug log

From: Ramanarayana <raam(dot)soft(at)gmail(dot)com>
To: "Iwata, Aya" <iwata(dot)aya(at)jp(dot)fujitsu(dot)com>
Cc: "Nagaura, Ryohei" <nagaura(dot)ryohei(at)jp(dot)fujitsu(dot)com>, Jacob Champion <pchampion(at)pivotal(dot)io>, Jim Doty <jdoty(at)pivotal(dot)io>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, "nagata(at)sraoss(dot)co(dot)jp" <nagata(at)sraoss(dot)co(dot)jp>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Subject: Re: libpq debug log
Date: 2019-02-18 13:56:48
Message-ID: CAKm4Xs4AVkSArc8TgvcbxkV95sYe36+sMO5vOgGwikJpYWcP0g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I have tested the trace log implementation.Please find my feedback for the
same.

Issues found while testing
---------------------------------
1) If invalid value is given to PGLOGMINLEVEL, empty log file is created
which should not happen.
2) If log file size exceeds the value configured in PGLOGSIZE, new log file
is not getting created.
3) If PGLOGSIZE is greater than 2048 bytes, log file is not created.Is this
expected behaviour?
4) In the log file, an extra new line is present whenever the query is
printed.Is this intentional?
5)Documentation for this feature is having grammatical errors and some
spelling errors which can be looked into.

Feedback in the code
----------------------------------
1) if else statement should be used for checking log levels rather than
multiple if statements
2) Across the code, sufficient space need to be left between parameters in
functions and while using comparison operators
3) In libpq-fe.h in the comments section it should trace rather than trce

Suggestions
----------------------
-> Will it better if the logs of all processes are written to a single log
file with the log message containing the process id rather than one log
file per process?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2019-02-18 13:58:09 Re: libpq environment variables in the server
Previous Message Andrew Dunstan 2019-02-18 13:56:19 Re: Ryu floating point output patch