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 1u5qLs-006lPL-JR for pgsql-general@arkaria.postgresql.org; Fri, 18 Apr 2025 18:22:12 +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 1u5qLq-0005gJ-20 for pgsql-general@arkaria.postgresql.org; Fri, 18 Apr 2025 18:22:10 +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 1u5qLp-0005gB-Mv for pgsql-general@lists.postgresql.org; Fri, 18 Apr 2025 18:22:10 +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 1u5qLn-000miP-0W for pgsql-general@postgresql.org; Fri, 18 Apr 2025 18:22:10 +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 53IIM4p12643501; Fri, 18 Apr 2025 14:22:04 -0400 From: Tom Lane To: "Mansky, Edmund J. (GSFC-671.0)[ADNET Affiliate]" cc: "pgsql-general@postgresql.org" Subject: Re: Why is an error not thrown when the time exceeds the lock timeout for an ExclusiveLock on a transaction ? In-reply-to: References: Comments: In-reply-to "Mansky, Edmund J. (GSFC-671.0)[ADNET Affiliate]" message dated "Fri, 18 Apr 2025 17:28:26 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2643499.1745000524.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 18 Apr 2025 14:22:04 -0400 Message-ID: <2643500.1745000524@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "Mansky, Edmund J. (GSFC-671.0)[ADNET Affiliate]" writes: > I see in the log at that point : process 683860 still waiting for ShareL= ock on transaction 492777941 after 1000.140 ms > while updating tuple (1282= 991,25) in relation "sum_partn_alloc" > The Postgres server (12.22), running on RHEL 8.10 is configured with a d= efault lock timeout of 1 sec. > Why is Postgres not throwing an error when the ShareLock time has exceed= ed 1 sec. ? I think you have misread the description of deadlock_timeout: it is the lock wait time after which we check to see if there's a deadlock. If there's not, we just log the above message (if configured to do so) and keep waiting. If you want to fail after X amount of time, lock_timeout or perhaps statement_timeout is what to set for that. regards, tom lane