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 1sMhrI-0040Mt-De for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Jun 2024 05:39:48 +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 1sMhrF-008PmN-Rc for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Jun 2024 05:39:46 +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 1sMhrE-008PmF-Ct for pgsql-hackers@lists.postgresql.org; Thu, 27 Jun 2024 05:39:45 +0000 Received: from fout2-smtp.messagingengine.com ([103.168.172.145]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sMhrB-003L5j-N3 for pgsql-hackers@lists.postgresql.org; Thu, 27 Jun 2024 05:39:43 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id 4CA1C1380500; Thu, 27 Jun 2024 01:39:40 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 27 Jun 2024 01:39:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1719466780; x=1719553180; bh=wFGYw+b2bx var8k3lkxQFoG1re7C3zfqONQj8ZlkTT8=; b=CP4VCAiEtzIhjCTEe0r9/FE2rz 4L+lNG3Q+g3u1avTDNe7AANZxdlofBZlW0OQdFkX6L0uXNkdzraKhvF0TbrRGYLQ KhciOa3Q174fWOFs+gfJhqJY2Ees+5/IxdjhNoNLSVb0XbzuY3f1UicxqyoVF/5M Ae6wr5rHTh0M1bBpOynndW9cTvNYsO6hOsgt+C/gHbk+z2Eg9mvsNbHpt/0byQNa LmhDO49Xdj1WWBCkbRAWhuXR7/eyrJWG2aTdizdpoXIiYSTz/d8i7856v7OSL5p0 RfpXeOIEPfovdPhZH+uK0S/VbXmfr7sRlb1CTnZn2NGM00+tkMs0tC2zlA5g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1719466780; x=1719553180; bh=wFGYw+b2bxvar8k3lkxQFoG1re7C 3zfqONQj8ZlkTT8=; b=ddBb1JFY/zw36PbHnnIk5AySljfI8ZeJob5clTwG66Eo HCBUudHKuq3EdRzZ0WCtLFV8EQ0bo2jwYlrPwKzml3Ws/wzAuXy7QLAnKu1xhVZ+ +6s2hpvn7zJ4K59b3g11NZofI9ZRePAftnV0b6mLmFQKAyRimd6HY5sHXTnSc6OP yDGlkue8KLeYshDC5ZnYsEfeO4YHib4bthwbbelEXOKcYgPZ0En/v7CyL+xVOqPu xJ62O7nJcuyAJmGYjU+QMeR49NXewcybb3Lhq/cSuGuGHzVJNbtrYeBLLGNVQKPI Rb9V+EWnW+m9pro8WSawQ15FhTa8ikXtqkT7V22iPQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrtdefgdelkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdefhedmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeg geffhfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 27 Jun 2024 01:39:37 -0400 (EDT) Date: Thu, 27 Jun 2024 14:39:21 +0900 From: Michael Paquier To: Jelte Fennema-Nio Cc: Alvaro Herrera , Nathan Bossart , PostgreSQL Hackers Subject: Re: libpq: Fix lots of discrepancies in PQtrace Message-ID: References: <202406261636.w7emb6xa6eto@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hyJe8P7VXOs8QepH" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --hyJe8P7VXOs8QepH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 26, 2024 at 10:02:08PM +0200, Jelte Fennema-Nio wrote: > On Wed, 26 Jun 2024 at 18:36, Alvaro Herrera wr= ote: > > Thanks, Nathan. I'm holding myself responsible for the rest ... will > > handle soon after the branch. >=20 > Sounds great. Out of curiosity, what is the backpatching policy for > something like this? Honestly most of these patches could be > considered bugfixes in PQtrace, so backpatching might make sense. OTOH > I don't think PQtrace is used very much in practice, so backpatching > might carry more risk than it's worth. 0001 getting on HEAD after the feature freeze as a cleanup piece cleanup is no big deal. That's cosmetic, still OK. Looking at the whole, the rest of the patch set qualifies as a new feature, even if they're aimed at closing existing gaps. Particularly, you have bits of new infrastructure introduced in libpq like the current_auth_response business in 0004, making it a new feature by structure. + conn->current_auth_response =3D AUTH_RESP_PASSWORD; ret =3D pqPacketSend(conn, PqMsg_PasswordMessage, pwd_to_send, strlen(pwd= _to_send) + 1); + conn->current_auth_response =3D AUTH_RESP_NONE; It's a surprising approach. Future callers of pqPacketSend() and pqPutMsgEnd() would easily miss that this flag should be set, as much as reset. Isn't that something that should be added in input of these functions? + AuthResponseType current_auth_response; I'd recommend to document what this flag is here for, with a comment. -- Michael --hyJe8P7VXOs8QepH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmZ8+wkACgkQnvQgOdby QH1VZw/9G74zkK8/rJvK7xMZsgbPKNwwnf9dTKPhgtKamC16BSstLmrsdf8yLMwC FLh46zOKN77hvEpmQd9/YJKduUtUJyfjh7reQUZIVYbH56pf1YESo41eCVw+F3br 5zuQZfK6J6pN1RFrEv7Xagxd8rYdzGM7ElvJy5ifLRl0dXwgCWDYPkpUtrD/6MXQ CDaQYUC4/2glG74ojGfeBDsRyeRcfytidjpwByWhvFqxaAtFQ94x+UhenwfJijNB nlJyqVsgSiDotORu2sBHq9aEZQifo7OgamlDW8IbHapBkyyq5g8WeqOrfKcjpG0T Xkq+oRpYghcYzuyGkkWghEvXhK5+C5WQlCcTlMqb5i7ROCyuw0DeuWwnZIZfUo59 n15OveB75bmmu05kx8MWFIPuSrhz5UKCCxy022yjQnfAz2t6USI71AX4OrXguPtE wg4HH+Gu533sz+9K3Wv+VTxX+0LOdscRQJwpO4ESJ3g+aGZMy/Zu5j5b2wdNmmGI nC9dnxk7G3AZyzKvwhNJE5ROxoXWuJMmfHNPuYkPHUPRtVHmYBafesXxEMjf0Vh8 GhoAIYdWpyZ5ZkIk9KU50bu+DzXBYGif5mArV7Nbacc4p9CjME1O5MM8nhhA1kc3 ZmJPUzNUKCifPAX96nrYpwVQBp3Uj0Hpgsb5S5eYwTpj75pryW0= =yts9 -----END PGP SIGNATURE----- --hyJe8P7VXOs8QepH--