Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ruCoJ-003Sv8-7g for pgsql-general@arkaria.postgresql.org; Tue, 09 Apr 2024 14:50:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ruCoH-006B0n-VM for pgsql-general@arkaria.postgresql.org; Tue, 09 Apr 2024 14:50:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ruCoH-006AzT-Kc for pgsql-general@lists.postgresql.org; Tue, 09 Apr 2024 14:50:53 +0000 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1ruCoE-0002HP-SK for pgsql-general@lists.postgresql.org; Tue, 09 Apr 2024 14:50:53 +0000 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2d6ff0422a2so70693551fa.2 for ; Tue, 09 Apr 2024 07:50:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712674249; x=1713279049; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=P+x+eF4ft17rI3pmyrEkixD9qoD8zOKw3S/yBmXk2WE=; b=KKeY+63W+VJgnKn3UIweK7SvUn5el8uPUFJF1koMRdBfxzBhKk2cWmJxyo56v8jNe+ ePY4+KZoV1+8xR6BhxdHLrV4z00/aOz5ZuSYPR/nwM4Mo9A2jyLQaoiYMHq10EOMFI2q +lpnf50lcADpAqLU3P6uQTyGsM+cppPonLWqVK0d140TsJglKkJkKpotWVHTJ4FFsemm woQSpqxNiLnYbieX38JmSBm5jVVwyJOdPdtiFHG4PsDV8OJ4l8y1aW1IdfdTUNhp8k7R RbGeMHw0KMAzlrGoFp23IKwwlWQkvbDgl3O4ZGQdMEk7bw1Of+6rEdTQLjnKKnwqZckq mPUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712674249; x=1713279049; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=P+x+eF4ft17rI3pmyrEkixD9qoD8zOKw3S/yBmXk2WE=; b=O3jSZlrw39HJkVJysXZyjDfvcg6LtCZ9DIS6wQ4+3utQSQEzjUP/GoKm0jVlgnFGci nPCnjcODJY2axncVw2RE8oK5V4E1dzybC6YdSku1LVPFL9doJGBjtpEwLgpnJ6jcWeAh HmLSvSp8/Xn/Tv0kysjqAhNx57M8xFAztL/gA6BH84Xl1PxB1/d3MCy4+egDNyhxVlsE +czJoBz7mf9mJNKfuqLdL3U+rHjmj9iH4FUdn1znvJjy5XZKv0AUv4A9hnT1dLDGrj4l LSTIOJZLCEdnWwfHzjLVARr7/wBYMGnpDygkRiirxDssjrimLHyDCBLVD1FGc+pIbojY ruDQ== X-Gm-Message-State: AOJu0YyQJxEl8jXzoqOG+KCX6ykE6eaZmLDqGIu2g3UYZCGDmTJ9PWLy EQNwBIbbimzBlA+HdpzkrrskwufJUIR8BvXVwrII2ooocJ1UPAhqgI/h5Cza3s+djndS2Kkdwic q+xITpzjfp+ZtTzW5rGu1iGrYvRm2JWH9bVk= X-Google-Smtp-Source: AGHT+IFQEHjWwH1O+iworQda6ScuXHGGsq+YouCn26sFSVdbZL+afLk5vggxhuor6jH/zUBlyw72PXV0t0UtW/2lsmY= X-Received: by 2002:a05:651c:198c:b0:2d8:527c:7ada with SMTP id bx12-20020a05651c198c00b002d8527c7adamr41053ljb.38.1712674248901; Tue, 09 Apr 2024 07:50:48 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Greg Sabino Mullane Date: Tue, 9 Apr 2024 10:50:11 -0400 Message-ID: Subject: Re: Tracing libpq client: Only with PQtrace()? To: Sebastien Flaesch Cc: pgsql-general Content-Type: multipart/alternative; boundary="00000000000038cf360615ab0c90" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000038cf360615ab0c90 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 9, 2024 at 8:51=E2=80=AFAM Sebastien Flaesch 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 Cheers, Greg --00000000000038cf360615ab0c90 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Apr 9, 2024 at 8:51=E2=80=AFAM Se= bastien Flaesch <sebastien.= flaesch@4js.com> wrote:
Is the PQtrace() API the only way to enable libpq client trac= ing?

I thought about some environment variable of client configuration setting..= .

That's generally th= e job of the client, or more specifically, the driver providing the interfa= ce between your program and the libpq API. Unless you are writing at the lo= w level yourself, in which case, you would need to have your program detect= an env and call PQtrace() as needed.=C2=A0


Cheers,
G= reg
=C2=A0
--00000000000038cf360615ab0c90--