From: | "Iwata, Aya" <iwata(dot)aya(at)jp(dot)fujitsu(dot)com> |
---|---|
To: | "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> |
Cc: | 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-01-31 09:11:06 |
Message-ID: | 71E660EB361DF14299875B198D4CE5423DEBD26D@g01jpexmbkw25 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Nagaura-san,
Thank you for your review and advice.
> This merit was very helpful for my use, so I want your proposal function in
> postgres.
Thank you.
> 1)
> It would be better making the log format the same as the server log format,
> I think.
> Your log format:
> 2019/01/22 04:15:25.496 ...
> Server log format:
> 2019-01-22 04:15:25.496 UTC ...
> There are two differences:
> One is separator character of date, "/" and "-".
> The another is standard time information.
Sure. I will change separator character to "-" and add timezone information.
> 2)
> It was difficult for me to understand the first line message in the log file.
> "Max log size is 10B, log min level is LEVEL1"
> Does this mean as follows?
> "The maximum size of this file is 10 Bytes, the parameter 'log min level'
> is set to LEVEL 1."
Yes. The purpose of the line message is to check the value of the set parameter.
I will change it to you suggest.
> 3)
> Under the circumstance that the environment variables "PGLOGDIR" and
> "PGLOGSIZE" are set correctly, the log file will also be created when the
> user connect the server with "psql".
> Does this follow the specification you have thought?
> Is there any option to unset only in that session when you want to connect
> with "psql"?
There are no option to not output log when connected by "psql".
It is not good to create lots of empty files. I think that the cause of this issue is that the initialization location of the new trace log is not good.
I will fix it so that logs are not output when connected to "psql".
> 4)
> Your patch affects the behavior of PQtrace().
> The log of the existing PQtrace() is as follows:
> From backend> "id"
> From backend (#4)> 16387
> From backend (#2)> 1
> From backend (#4)> 23
> ...
> Your patch makes PQtrace() including the following log in addition to the
> above.
> To backend> Msg complete, length 27
> Start sending message to backend:End sending message to backend:PQsendQuery
> end :PQgetResult start :Start receiving message from backend:End receiving
> message from backend:From backend> T ...
Thank you for finding it. I will fix not to affect PQtrace().
Regards,
Aya Iwata
From | Date | Subject | |
---|---|---|---|
Next Message | Antonin Houska | 2019-01-31 09:15:21 | Re: Unused parameters & co in code |
Previous Message | John Naylor | 2019-01-31 08:41:56 | Re: WIP: Avoid creation of the free space map for small tables |