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 1scXmT-008Jex-Bv for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Aug 2024 22:08:17 +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 1scXmR-006OTz-Ge for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Aug 2024 22:08:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1scXmQ-006OTr-Ny for pgsql-hackers@lists.postgresql.org; Fri, 09 Aug 2024 22:08:15 +0000 Received: from fout4-smtp.messagingengine.com ([103.168.172.147]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1scXmK-003wpb-13 for pgsql-hackers@lists.postgresql.org; Fri, 09 Aug 2024 22:08:13 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id E5280138D15E; Fri, 9 Aug 2024 18:08:05 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 09 Aug 2024 18:08:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1723241285; x= 1723327685; bh=a2ums+cYQS+aHrlHo+c3XxgWBIgp7eEJDqQns8pN3f8=; b=U R3xkWug0v6VTVW3wSyKH6xEzfN6lmJdw/F+sUHw1PI1zBgR/ot1rlsl7jbQZOQFY PM4OktKpKD70UfwTwIoh48FJACQ8nvSt3h8TmYpgFI7TKYF7qK1/R+7XZOVAU1N3 QB1RhfIwdKdjBYsD2BhOkO3Wm0t0q9vmg4xTxofRfMFoB9bWdWC+XhWmSVVvDO57 EQJhxbC2Wg1SV1ajbluac0JH6bYpd0EYFE6iOsJgMs5ifmHHCRL/zqYFMZPT0lXE Tw07DpV+EBSQcxRNU/NxcQ//DsJBwPxKqM/01hOubyj10ULPEAPDYZsBjcBiRau/ VkJOY9gl5EGzMvCtMnu3g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrleehgddtiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecu hfhrohhmpeetlhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrd hnohdqihhprdhorhhgqeenucggtffrrghtthgvrhhnpedvkedtffduffdtffffheffhfej jefhgfeiueeukeejkeffgfdufffhudffffeuveenucffohhmrghinhepvghnthgvrhhprh hishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrghdpnhgspghrtg hpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepnhgrthhhrghnuggs ohhsshgrrhhtsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhoshhtghhrvghssehjvg hlthgvfhdrnhhlpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdr phhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohepmhhitghhrggvlhesphgrqhhuih gvrhdrgiihii X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 9 Aug 2024 18:08:04 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1723241282; bh=QM92BV3jUr4IRmQ9da6vR9M+YhEGh0E+2wyCkxvJe14=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=f9/ydzD9qgKf2JwT2pVS3AUqnqlgSThfbKPcntCJ67DiNVVIx/IxauIbj9PaK0oxh zgUXqYLx8kbqWoH3WBrFJI1Pa/XPH3//wQyuNazEMqHOEJPbBYWVEKjx6DBxayKlA5 8Qd1HDkYTwNJ45o+QjyxY3TeFhgcgaewCIrA14raYsRRvi5KWTNxR5Vh3gysDpWeEK +Tjc95gyxtYVBDO/ns5uwDPKvvSYdVnCExcCUQ0YsshTSsQH8U2hdnE5wKx/Q7nfqW TfCQqsfSDYPywQz2vMjDHti3m6UBVTFCejiDmVYJbPzNnaUXC97xKxBy+6h0UAQeiU JOzB1GoPeJZ1w== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 53495E9; Fri, 9 Aug 2024 18:08:02 -0400 (-04) Date: Fri, 9 Aug 2024 18:08:02 -0400 From: Alvaro Herrera To: Jelte Fennema-Nio Cc: Michael Paquier , Nathan Bossart , PostgreSQL Hackers Subject: Re: libpq: Fix lots of discrepancies in PQtrace Message-ID: <202408092208.2mhpq5dsz7hy@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Pushed 0002 and 0003. On the latter: I decided against using int32 to print the request identifiers; by splitting into two int16's, we see that the numbers match the values in the PG_PROTOCOL() declarations: 2024-08-09 17:37:38.364622 F 8 SSLRequest 1234 5679 and 2024-08-09 17:37:38.422109 F 16 CancelRequest 1234 5678 NNNN NNNN (I didn't verify GSSEncRequest directly.) I also verified that in non-regress mode, the values printed by CancelRequest match those in the BackendKeyData message, 2024-08-09 17:34:27.544686 B 12 BackendKeyData NNNN NNNN I also added suppression in regress mode for the backend key in the CancelRequest message, since they would be different each time. There are no tests for this code. We could add a trace file for the connection packet in libpq_pipeline by changing PQconnectdb() to PQconnectStart() and then do PQtrace before polling until the connection is ready; we would have to have it match for the TAP test. Not sure this is worth the effort. But doing this in a very crude way allowed me to verify that, at least on my machine, this code is doing what's expected. Thank you, -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/