Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lK7HA-00074Q-3P for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Mar 2021 22:25:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lK7H8-0003aG-V2 for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Mar 2021 22:25:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lK7H8-0003a9-OX for pgsql-hackers@lists.postgresql.org; Wed, 10 Mar 2021 22:25:54 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lK7H6-0007HG-Om for pgsql-hackers@lists.postgresql.org; Wed, 10 Mar 2021 22:25:53 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id A2B5F3207; Wed, 10 Mar 2021 17:25:50 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 10 Mar 2021 17:25:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=oh15+tpsEoQCIhjH/Y4xHdn5WRTxNedOvk9MI0sRC8w=; b=UQkI3Gra QjAH5wpHtlP2HSrCyuKLEsvqSXwu+jsVPyOMWs4B8zLooGoeWBJQrcNnoq+POeWS enPsMmAjev6bJRD/SuZ0OtDtFCG3WJPROftBNNDZQefJISgJzRqODKiaNm26ua04 GSGE0BUHXqt5z3fk4JZRBX2YbBk5DUeh82YlPcXt9BYr15qB7TujyS1JqdjexXOW m/9orJ/NiWhhh6Tu7WD9kH9byvdJqpi+qy0TbDA52VcmOcVoMWzGSNgsZo25oEm1 RzSIKW9CSohrJ53wPKKYi2SRA+7ve80pp8XKZbPDvImfosAMERt2Twn9RLVYpSXW 6iGmsQWzy4o/5Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddukedgudeiudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfggtggugfgjfgesth ekredttderudenucfhrhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghr rhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepueffhfejie euueffgedvudekgeeltdeviedvieeufeeiieevgfetheeufeethedvnecukfhppeduledt rdelhedrudelrdelheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.95]) by mail.messagingengine.com (Postfix) with ESMTPA id 89B3A240057; Wed, 10 Mar 2021 17:25:49 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 9F92B2A0914; Wed, 10 Mar 2021 19:25:46 -0300 (-03) Date: Wed, 10 Mar 2021 19:25:46 -0300 From: Alvaro Herrera To: Tom Lane Cc: "iwata.aya@fujitsu.com" , "tsunakawa.takay@fujitsu.com" , "k.jamison@fujitsu.com" , 'Kyotaro Horiguchi' , "pgsql-hackers@lists.postgresql.org" Subject: Re: libpq debug log Message-ID: <20210310222546.GA18802@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2217283.1615411989@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Mar-10, Tom Lane wrote: > After studying this further, I think we should apply the attached > patch to remove that responsibility from pqParseInput3's subroutines. > This will allow a single trace call near the bottom of pqParseInput3 > to handle all cases that that function processes. Works for me. > BTW, while looking at this I concluded that getParamDescriptions > is actually buggy: if it's given a malformed message that seems > to need more data than the message length specifies, it just > returns EOF, resulting in an infinite loop. This function apparently > got missed while converting the logic from v2 (where that was the > right thing) to v3 (where it ain't). So that bit needs to be > back-patched. Ah, that makes sense. > I'm tempted to back-patch the whole thing though. +0.5 on that. I think we may be happy that all branches are alike (though it doesn't look like this will cause any subtle bugs -- breakage will be fairly obvious). -- Álvaro Herrera 39°49'30"S 73°17'W "Most hackers will be perfectly comfortable conceptualizing users as entropy sources, so let's move on." (Nathaniel Smith)