From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Mansky, Edmund J(dot) (GSFC-671(dot)0)[ADNET Affiliate]" <edmund(dot)j(dot)mansky(at)nasa(dot)gov> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Why is an error not thrown when the time exceeds the lock timeout for an ExclusiveLock on a transaction ? |
Date: | 2025-04-18 18:22:04 |
Message-ID: | 2643500.1745000524@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Mansky, Edmund J. (GSFC-671.0)[ADNET Affiliate]" <edmund(dot)j(dot)mansky(at)nasa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Martin Gainty | 2025-04-18 18:49:15 | Re: Why is an error not thrown when the time exceeds the lock timeout for an ExclusiveLock on a transaction ? |
Previous Message | Mansky, Edmund J. (GSFC-671.0)[ADNET Affiliate] | 2025-04-18 17:28:26 | Why is an error not thrown when the time exceeds the lock timeout for an ExclusiveLock on a transaction ? |