Search Postgresql Archives

Re: Transaction settings: nowait

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux