public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Mansky, Edmund J. (GSFC-671.0)[ADNET Affiliate] <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Why is an error not thrown when the time exceeds the lock timeout for an ExclusiveLock on a transaction ?
Date: Fri, 18 Apr 2025 14:22:04 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

"Mansky, Edmund J. (GSFC-671.0)[ADNET Affiliate]" <[email protected]> writes:
> I see in the log at that point : process 683860 still waiting for ShareLock on transaction 492777941 after 1000.140 ms
>                                               while updating tuple (1282991,25) in relation "sum_partn_alloc"

> The Postgres server (12.22), running on RHEL 8.10 is configured with a default lock timeout of 1 sec.

> Why is Postgres not throwing an error when the ShareLock time has exceeded 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






view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Why is an error not thrown when the time exceeds the lock timeout for an ExclusiveLock on a transaction ?
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox