public inbox for [email protected]  
help / color / mirror / Atom feed
From: Alvaro Herrera <[email protected]>
To: Greg Sabino Mullane <[email protected]>
Cc: Sebastien Flaesch <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: Tracing libpq client: Only with PQtrace()?
Date: Tue, 9 Apr 2024 17:01:22 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKAnmmKxUOcVk_NWVtxhRd_ks-MHKKt4hHU0Z+WTAkBEoLjC7w@mail.gmail.com>

On 2024-Apr-09, Greg Sabino Mullane wrote:

> On Tue, Apr 9, 2024 at 8:51 AM Sebastien Flaesch <[email protected]>
> wrote:
> 
> > Is the PQtrace() API the only way to enable libpq client tracing?
> >
> > I thought about some environment variable of client configuration
> > setting...
> 
> That's generally the job of the client, or more specifically, the driver
> providing the interface between your program and the libpq API. Unless you
> are writing at the low level yourself, in which case, you would need to
> have your program detect an env and call PQtrace() as needed.
> 
> See for example
> https://metacpan.org/pod/DBD::Pg#parse_trace_flag-and-parse_trace_flags

Another approach might be to use Wireshark, which has a decoder for the
Postgres FE/BE protocol.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"Pido que me den el Nobel por razones humanitarias" (Nicanor Parra)






reply

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Tracing libpq client: Only with PQtrace()?
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox