Re: Why is an error not thrown when the time exceeds the lock timeout for an ExclusiveLock on a transaction ? - Mailing list pgsql-general

From Tom Lane
Subject Re: Why is an error not thrown when the time exceeds the lock timeout for an ExclusiveLock on a transaction ?
Date
Msg-id 2643500.1745000524@sss.pgh.pa.us
Whole thread Raw
In response to Why is an error not thrown when the time exceeds the lock timeout for an ExclusiveLock on a transaction ?  ("Mansky, Edmund J. (GSFC-671.0)[ADNET Affiliate]" <edmund.j.mansky@nasa.gov>)
List pgsql-general
"Mansky, Edmund J. (GSFC-671.0)[ADNET Affiliate]" <edmund.j.mansky@nasa.gov> 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



pgsql-general by date:

Previous
From: "Mansky, Edmund J. (GSFC-671.0)[ADNET Affiliate]"
Date:
Subject: Why is an error not thrown when the time exceeds the lock timeout for an ExclusiveLock on a transaction ?
Next
From: Martin Gainty
Date:
Subject: Re: Why is an error not thrown when the time exceeds the lock timeout for an ExclusiveLock on a transaction ?