Re: Add PQTRACE env to enable protocol tracing in libpq

From: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
To: Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add PQTRACE env to enable protocol tracing in libpq
Date: 2026-08-11 12:31:06
Message-ID: CAGECzQQ8b_J8R+ZMoD1+Zb5=8YcZqQ796DHPaeZ3nMacUAahEA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 31 Jul 2026 at 11:01, Anthonin Bonnefoy
<anthonin(dot)bonnefoy(at)datadoghq(dot)com> wrote:
> This patchset introduces a new PQTRACE option in libpq, allowing to
> use protocol tracing in psql:
>
> PQTRACE="-" psql
> 2026-07-30 14:33:06.654865 F 8 SSLRequest 1234 5679
> 2026-07-30 14:33:06.656358 B 1 SSLResponse N
> ...
> 2026-07-30 14:33:06.659056 B 5 ReadyForQuery I
> postgres=#

I haven't had time to review this yet. But this is a feature I've
wanted for a long time! So huge +1 for the idea.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2026-08-11 12:36:36 Re: Missing list_free in publicationcmds.c:OpenTableList
Previous Message Daniel Gustafsson 2026-08-11 12:28:52 Re: [PATCH] libpq: remove unused PGconn.ssl_handshake_started field