Re: Transaction settings: nowait - Mailing list pgsql-general

From durumdara
Subject Re: Transaction settings: nowait
Date
Msg-id 4A018423.7070307@gmail.com
Whole thread Raw
In response to Transaction settings: nowait  (durumdara <durumdara@gmail.com>)
List 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 by date:

Previous
From: ml
Date:
Subject: tsearch2 memory problem
Next
From: "Albe Laurenz"
Date:
Subject: Re: Transaction settings: nowait