Re: Transaction settings: nowait

Поиск
Список
Период
Сортировка
От durumdara
Тема Re: Transaction settings: nowait
Дата
Msg-id 4A018423.7070307@gmail.com
обсуждение исходный текст
Ответ на Transaction settings: nowait  (durumdara <durumdara@gmail.com>)
Список pgsql-general
Hi!

2009.05.06. 11:54 keltezéssel, Richard Huxton írta:
> durumdara wrote:
>>
>> So: have PGSQL same mechanism like nowait?
>
> When you take a lock:
> http://www.postgresql.org/docs/8.3/interactive/sql-lock.html
> http://www.postgresql.org/docs/8.3/interactive/sql-select.html#SQL-FOR-UPDATE-SHARE
>
As I see these things are not help to me when two transactions are
trying to use same recource...

Yesterday I tried to test my PG Website. I withdrew a "rollback"
instruction from the code.
The transaction started, but the insert SQL was wrong (I miss some
required field).
So this transaction haven't been changed anything on the table, but the
transaction remaining in "active" state because my fail.
Then the pgadmin is flew away on a field readjustment in this table.
This was an deadlock...

I don't want to see any deadlocks... I don't want to lock the tables.


>
> There is also the "statement_timeout" config setting which will
> terminate any single statement that takes longer than a set time.
> http://www.postgresql.org/docs/8.3/interactive/runtime-config-client.html#RUNTIME-CONFIG-CLIENT-STATEMENT
>
>
>
As I read this config param, this is terminate the statements only.
As I think, this meaning that if I have a "wrong join", or I do very
slow query, the server can cancel and terminate it.
But if I have a transaction that remaining in opened state, this could
be a source of the errors (deadlocks).

Thanks for your help:
    dd


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

Предыдущее
От: ml
Дата:
Сообщение: tsearch2 memory problem
Следующее
От: "Albe Laurenz"
Дата:
Сообщение: Re: Transaction settings: nowait