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.96) (envelope-from ) id 1voAEh-00G5mQ-3C for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Feb 2026 01:02:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1voAEg-001ZFf-0p for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Feb 2026 01:02:14 +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.96) (envelope-from ) id 1voAEf-001ZFX-2i for pgsql-hackers@lists.postgresql.org; Fri, 06 Feb 2026 01:02:13 +0000 Received: from mail-dy1-x1329.google.com ([2607:f8b0:4864:20::1329]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1voAEd-00000001HMH-0aGB for pgsql-hackers@lists.postgresql.org; Fri, 06 Feb 2026 01:02:13 +0000 Received: by mail-dy1-x1329.google.com with SMTP id 5a478bee46e88-2b8397e3e09so2061972eec.0 for ; Thu, 05 Feb 2026 17:02:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ardentperf-com.20230601.gappssmtp.com; s=20230601; t=1770339729; x=1770944529; darn=lists.postgresql.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=LHIGcrTjwybt+fiBl3htoEhdE+AGLYanX57OuocTZ60=; b=VJrxqKWDuX2fv3vUncEB2zoFMcTALIzdpcAka8QAIls7zMY+pTIlVDZNhIZewQP4v4 v8APrKKVxexKAvcJQ1E/O84yZGZw1QLyexHFnc23sukcxOzecrYjuilctZF5aI5YOriJ ZnHfgdNrvTitA7BZUB5oUYAse9vX2lOQ44klivE8D/LAhBReOwKMskohh5CuJx803SGH XNF9vrSVFA7MgFrx4kOEVE7Y0ju5+xqOmWew7SuiI9LJV0uqrTtERxpnNYY+gUJcgPqp xIiF9cVJ11hS8h61xjat8iQXthUVBibL2j0j1KOBul74uWGl8svwLKzvflt62Fx42ylP 2S6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770339729; x=1770944529; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=LHIGcrTjwybt+fiBl3htoEhdE+AGLYanX57OuocTZ60=; b=fHGbpF7mLqfDLYueN8DJq1tEFrJvCXC6/+lNyj65cgGmE4KD8IFgzNRCkjd8wMnYoi mN0MF3D15JJpHbhb3zSdnhTDQBkfTFeYCmUiiwJkVWQGDU/s5iwrvjvBu6kLDXp96BNZ eXjrewBKyvpWpRw8H29rx9Xm1MyfbkGPf7GrrDIgGftJfXT0XUOuqwVeKg1PO1xf+Bue gk93mepRgSSQB9pW1qXYUqfsjCr1lCZZ6r1WtaZZH5u82hQCuUgAtOk0/O7Ve6Lnw80Y e73ru+GsT512Vp5z4lNoGAgLDFPCUsC7g2lkVwA0ht61UNLs9qm2s5+Wc6cKj3nN0khK ZKLA== X-Forwarded-Encrypted: i=1; AJvYcCXY49tIH7lCQTLYExwk215EY3VAg0lgvUj2sG3JNPKLhfn6jRsJZVZXDsOzGGWyO8rTHtlDwVoU67OGASnZ@lists.postgresql.org X-Gm-Message-State: AOJu0Yzt7exq62phFptHNEoHj/7WyISG8qvuGStHFn7V1RUJ4RjHvM5v +1dOnl2up72pJPszPPufhCyb2V+S3a4UDSiJ8zaq/XX7CVF5aHJ9IFmz1uMK5489vg== X-Gm-Gg: AZuq6aJkw7hnmzu7bIJ3OUCQEoHgBURgc6t9Vg5L/RX+oCwOA0JirysWoxKmwluoxIg tq9XtjVfed0W3CwZV+yJLCc7FFpqorANOpCNAsZL5PznB5Kv+viEkfPp6yZFOiqbMbVD1ELFxgj e7y3wi9HFigPW1cgSNJbjA0ZBiUXOIAzUITLkNUS60hjtLvM1VZmt13WwWTMidlHcqaj45v9gaj 8VDW4bPwh2tH3n/l6vsnpssQ+sE5iHCJ68eXK07xy7o42GdGvhG/07tVY3amdi6k739iBLKcTRx dSK/FR1erwggomdcOAWMsfnwaXEo6KtffdNbZkZWoQE1Lmu41JqnqIHo7sbH6GKC2yzQnGepDm0 V0/4GguLapZ29UVeEPfYWxDwA1LX6itnZSwIPsDEfGz8SLNz2NcHapU9hbVJIWaY1Vww9uZiBiV 17DvVcxGu7e9LU0l3Bxfu2T06oK0cHBPNDyELQ7822w7J1WCu9aiIJezIOcJE4vcCTCnqSy3lYm /6mZw== X-Received: by 2002:a05:7301:22a9:b0:2ae:579d:2038 with SMTP id 5a478bee46e88-2b85645ef98mr440424eec.4.1770339728971; Thu, 05 Feb 2026 17:02:08 -0800 (PST) Received: from ardentperf.com (97-113-67-23.tukw.qwest.net. [97.113.67.23]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b855af5ca2sm774946eec.8.2026.02.05.17.02.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Feb 2026 17:02:08 -0800 (PST) Date: Thu, 5 Feb 2026 17:02:05 -0800 From: Jeremy Schneider To: Tom Lane Cc: Fujii Masao , Jacob Champion , "pgsql-hackers@lists.postgresql.org" , Marat Buharov , Greg Sabino Mullane , Thomas Munro Subject: Re: client_connection_check_interval default value Message-ID: <20260205170205.723c6cc2@ardentperf.com> In-Reply-To: <1667818.1770336112@sss.pgh.pa.us> References: <20260204213032.15bab46b@ardentperf.com> <20260205150452.00006167@ardentperf.com> <1667818.1770336112@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 05 Feb 2026 19:01:52 -0500 Tom Lane wrote: > I think enabling it by default is a nonstarter, because it changes > behavior in a significant way. Specifically, it's always been the > case that if the client disconnects during a non-SELECT query (or > anything that doesn't produce output), the backend would complete that > query before ending the session. I think it's very likely that there > are users depending on that behavior. Jeremy is describing an > application that evidently was built on the assumption that > disconnecting early would abort a wait, but that assumption was not > based on any testing. I think it's good that we now have an option > to make such an assumption hold, but that does not translate to > "we should force that behavior on everybody". Whether or not the > overhead is insignificant, there's a good chance that the change > would make more people unhappy than happy. This application was trying to kill the connection, the postgres client attempted to send a cancel message but the cancel message was lost and the client naturally falls back to just hard killing the network connection. I totally understand the cancel messages should not have gotten lost. But I'm surprised that we'd assume most users who kill -9 their hung client want their 10 hour query to keep running forever? Yes we always try to gracefully stop things first and let cancel messages get through, but I'd think if server received a FIN over the network then we could interpret that similar to a cancel message. This would be a change in a new major version; we wouldn't backpatch a GUC default. I see the concern around the behavior change, but I don't feel like this difference between CTRL-C and kill-9 should be sancrosact, if having them behave similarly seems generally reasonable. Postgres has made more significant changes than this before in major versions. -Jeremy