On Fri, Jan 3, 2020 at 1:05 PM Thomas Kellerer wrote:
> Michael Lewis schrieb am 03.01.2020 um 18:00:
>
> > Why take an exclusive lock on an entire table to update a single row?
>
> That's what I was asking myself as well.
>
Note that the code takes "row exclusive", not "exclusive". It is seve
Michael Lewis schrieb am 03.01.2020 um 18:00:
Why take an exclusive lock on an entire table to update a single row?
That's what I was asking myself as well.
I would not think that behavior would extend to lock_timeout based on the
explanation on stackexchange. I would assume that the potentially long
runtime in this function is mostly in acquiring the lock and not doing the
update given the implied primary key in the where clause, so perhaps
lock_timeo
Hi,
You cannot set the statement_timeout within a function.
You have to set it before you call the function.
For example, you can try :
BEGIN;
SET LOCAL statement_timeout = 6000;
SELECT * from public.”testlock”();
COMMIT;
The reason why is explained in this post :
https://dba.stackexchange.c