From: | Michael Lewis <mlewis(at)entrata(dot)com> |
---|---|
To: | Patrick FICHE <Patrick(dot)Fiche(at)aqsacom(dot)com> |
Cc: | İlyas Derse <ilyasderse(at)gmail(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <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-03 17:00:40 |
Message-ID: | CAHOFxGrzeUf3=9M9z_AFJz9PfHfETHpke5bwM6PMMXRkfc_EOQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-LOCK-TIMEOUT
>
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Kellerer | 2020-01-03 18:05:41 | Re: How can I set a timeout for a locked table in Function ? |
Previous Message | Patrick FICHE | 2020-01-03 13:04:07 | RE: How can I set a timeout for a locked table in Function ? |