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 1u9Bff-00GZ4N-Qp for pgsql-general@arkaria.postgresql.org; Sun, 27 Apr 2025 23:44:28 +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 1u9Bfc-00B6B6-OJ for pgsql-general@arkaria.postgresql.org; Sun, 27 Apr 2025 23:44:25 +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.94.2) (envelope-from ) id 1u9Bfc-00B6Ag-D9 for pgsql-general@lists.postgresql.org; Sun, 27 Apr 2025 23:44:25 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u9BfZ-002On3-1h for pgsql-general@lists.postgresql.org; Sun, 27 Apr 2025 23:44:24 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 53RNiJID579888; Sun, 27 Apr 2025 19:44:19 -0400 From: Tom Lane To: Marcelo Fernandes cc: pgsql-general@lists.postgresql.org Subject: Re: Resetting the lock_timeout value for a transaction In-reply-to: References: Comments: In-reply-to Marcelo Fernandes message dated "Mon, 28 Apr 2025 11:28:41 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <579886.1745797459.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 27 Apr 2025 19:44:19 -0400 Message-ID: <579887.1745797459@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Marcelo Fernandes writes: > I would have expected that the "RESET lock_timeout;" inside a transactio= n would > only reset the value of lock_timeout for that specific transaction. Or e= lse, > there would be an equivalent "RESET LOCAL lock_timeout;" to be used for = that. We don't seem to have bothered with that exact syntax, but you could spell it like SET LOCAL lock_timeout TO DEFAULT; regards, tom lane