Re: How can I set a timeout for a locked table in Function ? - Mailing list pgsql-general

From Jeff Janes
Subject Re: How can I set a timeout for a locked table in Function ?
Date
Msg-id CAMkU=1ztPxYcGb0Ft2aBQjf8J3BMPAsAdy8ECcKhSqSANHC8cg@mail.gmail.com
Whole thread Raw
In response to Re: How can I set a timeout for a locked table in Function ?  (Thomas Kellerer <spam_eater@gmx.net>)
List pgsql-general


On Fri, Jan 3, 2020 at 1:05 PM Thomas Kellerer <spam_eater@gmx.net> 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 several notches less restrictive, and is the mode an UPDATE statement is going to take anyway.  It still isn't clear why he is doing it, however.

Cheers,

Jeff

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: When should parameters be passed as text v. binary?
Next
From: Paula Kirsch
Date:
Subject: Re: When should parameters be passed as text v. binary?