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 1uMEcv-0069IX-B5 for pgsql-bugs@arkaria.postgresql.org; Mon, 02 Jun 2025 23:31:33 +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 1uMEct-00EKG8-2u for pgsql-bugs@arkaria.postgresql.org; Mon, 02 Jun 2025 23:31:31 +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 1uMEcs-00EKFz-4a for pgsql-bugs@lists.postgresql.org; Mon, 02 Jun 2025 23:31:30 +0000 Received: from fhigh-a7-smtp.messagingengine.com ([103.168.172.158]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uMEcp-0006sO-0g for pgsql-bugs@lists.postgresql.org; Mon, 02 Jun 2025 23:31:29 +0000 Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfhigh.phl.internal (Postfix) with ESMTP id 3FA6C11400FC; Mon, 2 Jun 2025 19:31:26 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Mon, 02 Jun 2025 19:31:26 -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=fm1; t=1748907086; x=1748993486; bh=i5EJRugSrE WCszgXLclH8M/LYXQbqq3ucmRpfnQYuAs=; b=lnbPyb8nJmwoMH0QEDF8WbmfoY lscRFPOkMVZAL8X1c2SHyAHhij8eRTKkvdyiu7Iy6NMHHsZm7Pu/DiwkCgfpMDvH VjAuZU1ByELQpIilPElawrIf9ec6HerDwFBT1lonh4e+XBafbEGnsPfwnC17nSUo Ep5luzuoG7gGyo0M444+NrqPri9wWJY3Cv6FJG0iskDxm0y7tWiYJxGKg2rH6Eld SPRnoaUYIHf0O7gT73092NnIxsgJS3g8ZNBaYWto6HV5UaCW+EtcE+zZtSh5RK/X +vIccSvfqa2KSUca5Pc2WPRQ+sV7EVzpzmQ17/YQO5NTewo8uNYg2qUMbQIA== 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-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1748907086; x=1748993486; bh=i5EJRugSrEWCszgXLclH8M/LYXQbqq3ucmR pfnQYuAs=; b=jnxjoNYUF3GQGOUV4BgwV0m153jwNpopvgqJhLJyCeb0bLXcyKT THZ6xAJrcV6tZ277ivO/Ph4Bv7Ckhn++LF6753ult5Py4FWc0Mtuu331LxXaFGR8 Rf1F04oqvk96qQ0dTVlOn0fWKI1BE1VzsZMfF20IcPuriIFhffOlfmslSXl87hG8 k6j7EEdtPFRvAj9Y1wM0L86XX1Ka3TsUVsm3hVVxMtnUrnKt1nrMSIMJMRSrEO1N GZNwjy9+wf0RSz/w2Bk7SCiMtG1c865NWcrBmK5mQNo4lod1Psh31PnehkKoepaQ 63fhViOIDoYGHxibZdaJnG11Glohtz4uFBw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddtgdefkeelleculddtuddrgeefvddrtd dtmdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggft fghnshhusghstghrihgsvgdpuffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftd dtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdejtddm necujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitg hhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeen ucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeggeffhfekueevteeigfduud evudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiipdhnsggprhgtphhtthhope efpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegrnhhthhhonhhinhdrsghonhhn vghfohihsegurghtrgguohhghhhqrdgtohhmpdhrtghpthhtohepnhdrkhgrlhhinhhinh esphhoshhtghhrvghsphhrohdrrhhupdhrtghpthhtohepphhgshhqlhdqsghughhssehl ihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 2 Jun 2025 19:31:23 -0400 (EDT) Date: Tue, 3 Jun 2025 08:31:16 +0900 From: Michael Paquier To: Anthonin Bonnefoy Cc: n.kalinin@postgrespro.ru, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18944: Assertion Failure in psql with idle_session_timeout Set Message-ID: References: <18944-8a926c30f68387dd@postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WUJlBj6LPVFv+BBZ" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --WUJlBj6LPVFv+BBZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jun 02, 2025 at 07:00:26PM +0200, Anthonin Bonnefoy wrote: > So if that's expected, we may need additional logic to avoid > increasing piped_syncs when we're after a COPY? On the other hand, > ignoring the SYNC seems to break the protocol spec expectation that > "there is one and only one ReadyForQuery sent for each Sync". Hmm. This stuff stands as it is in the backend COPY code since c01641f8aed0 from 2003, so there's not much we can do in the backend or libpq. Adding some specific logic in psql to avoid piped_syncs seems like the correct move seen from here. Most of that should be close to ExecQueryAndProcessResults(), don't you think? That's where we count the number of piped syncs. -- Michael --WUJlBj6LPVFv+BBZ Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmg+NEMACgkQnvQgOdby QH0jcA/8CtfzWXLK54fpHCGGd6b/9zmsp58IytA8sv3YaJpzNZpp+CWNDZ6vfOdX Ss8SbwiVbKejyRy5hJqJDZDP7dGHrrfH8fD8GXhvAFwhOTTQHclepzChOy2Hlkad cjR1KlOkCAHfJl3+sDq2CEj+MQB8i/3OCC8jgUi/90g5eT0KzfiAIpMUV0gj5uYJ bGzSm5vXH9We5x5C/PE8y764PdFXUyS3Rka5ItuqtQsj115veKL+ZeGRKh+3D9ba 1/brZfBfObG82SRT3zYfy7l62nwEmaNR0Z+FreiIFA91tzgSSUwUC0oIJ/IZrtt3 1YD48q5YtIOJhBJitWxRI66EnISlhqZfkN6jA8wGanwO2RS8bxRNqVHjm+nli5x2 IYZz9RSlSyhr3/DioD/8RG9aZFHiZ9EypMbNUo1HQPLxhdv5A0U4xkFlhTUqjkZJ IlF60/4/xIAI1sJqQ31Ar3mcQjLEh9tC2yrxcRNjTyZTmcSMQ5254rZRipQx+dW/ x6y6d03AQNBUm4M8Rg2boF5vFQfm/6jeVFlKy+mHzwH5V1gMhj+Y/M/Bwq8VMIE+ F3Kxhd6VRX5NwM8PdndDBXeW6drki+FzBPjBqFQBPaEy9DlPwj6k4q5NqppRjra7 DPMyLWBlCKAVPQPjLofJa9bdO+8n4AbCA2K3aK1FuEnco+ke0a4= =LZ+c -----END PGP SIGNATURE----- --WUJlBj6LPVFv+BBZ--