Re: How can I set a timeout for a locked table in Function ?

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Thomas Kellerer <spam_eater(at)gmx(dot)net>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: How can I set a timeout for a locked table in Function ?
Date: 2020-01-04 20:51:17
Message-ID: CAMkU=1ztPxYcGb0Ft2aBQjf8J3BMPAsAdy8ECcKhSqSANHC8cg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jan 3, 2020 at 1:05 PM Thomas Kellerer <spam_eater(at)gmx(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Paula Kirsch 2020-01-04 22:13:33 Re: When should parameters be passed as text v. binary?
Previous Message Adrian Klaver 2020-01-04 20:42:00 Re: When should parameters be passed as text v. binary?