Re: Waiting on a transaction

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Waiting on a transaction
Дата
Msg-id 20050816182525.GD9432@svana.org
обсуждение исходный текст
Ответ на Waiting on a transaction  (Bill Moseley <moseley@hank.org>)
Ответы Re: Waiting on a transaction  (Bill Moseley <moseley@hank.org>)
Список pgsql-general
On Tue, Aug 16, 2005 at 11:05:35AM -0700, Bill Moseley wrote:
> I've read over the docs on Concurrency Control but still not clear
> about when transactions block other updates, and how to deal with that
> on the application level.
>
> If I do a BEGIN and an UPDATE in one psql session and then try and do
> an UPDATE in another psql session that UPDATE waits until either a
> COMMIT or ROLLBACK.
>
> Is it common for applications using Postgresql to set a timer on
> updates and abort?

It is not normal to hold a transaction open while doing nothing. If you
always send transactions without delays the issue doesn't come up
because you never have to wait long enough for it matter. If you want
to see the issues it causes, search the web for "idle in
transaction"...

There may be a timeout, I've never needed it though...

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Bill Moseley
Дата:
Сообщение: Waiting on a transaction
Следующее
От: "Jonathan Villa"
Дата:
Сообщение: Adding contrib modules