From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Iwata, Aya <iwata.aya@jp.fujitsu.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: libpq debug log
Date: Sun, 02 Sep 2018 18:51:52 -0400
Message-ID: <3269.1535928712@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoYQNZm_DquU6wOd2NB13qrAMQ5vhd1P0Ggv0N3+khE8qQ@mail.gmail.com>
References: <71E660EB361DF14299875B198D4CE5423DE3FBA4@g01jpexmbkw25>
<25774.1535118514@sss.pgh.pa.us>
<CA+TgmoYQNZm_DquU6wOd2NB13qrAMQ5vhd1P0Ggv0N3+khE8qQ@mail.gmail.com>
Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Aug 24, 2018 at 9:48 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> PQtrace() is utterly useless for anything except debugging libpq
>> internals, and it's not tremendously useful even for that. Don't
>> bother with that part.
> I think that improving the output format could help with that a lot.
> What it current produces is almost unreadable; adjusting it to emit
> one line per protocol message would, I think, help a lot. There are
> probably other improvements that could be made at the same time.
I wouldn't mind throwing it out and reimplementing it ;-) ... tracing
at the logical message level rather than the byte level would help.
But still, I'm not really convinced that it has very much to do with
what you'd want in a user-level debug log.
Part of what's really bad about the PQtrace output is that in v2 protocol
the same output can be repeated several times as we try to parse a message
and conclude we don't have it all yet. I believe that problem is gone
in v3, but it may be hard to do a consistent redesign until we nuke libpq's
v2 support. Still, it might be past time for the latter, seeing that
we no longer promise pre-7.4 compatibility in either psql or pg_dump.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, iwata.aya@jp.fujitsu.com
Subject: Re: libpq debug log
In-Reply-To: <3269.1535928712@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox