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

From Michael Lewis
Subject Re: How can I set a timeout for a locked table in Function ?
Date
Msg-id CAHOFxGrzeUf3=9M9z_AFJz9PfHfETHpke5bwM6PMMXRkfc_EOQ@mail.gmail.com
Whole thread Raw
In response to RE: How can I set a timeout for a locked table in Function ?  (Patrick FICHE <Patrick.Fiche@aqsacom.com>)
Responses Re: How can I set a timeout for a locked table in Function ?
List pgsql-general
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_timeout would fit the need.

Or perhaps this is a much-simplified example and the real problem is not apparent. Why take an exclusive lock on an entire table to update a single row? What is this locks table for? Would advisory locks be the proper solution to the root problem perhaps? Just throwing things out there since context was lacking in the original question.

Attachment

pgsql-general by date:

Previous
From: Patrick FICHE
Date:
Subject: RE: How can I set a timeout for a locked table in Function ?
Next
From: Thomas Kellerer
Date:
Subject: Re: How can I set a timeout for a locked table in Function ?