Skip site navigation (1) Skip section navigation (2)

Re: lock - feedback

From: Thomas Rokohl <rokohl(at)raygina(dot)de>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Re: lock - feedback
Date: 2005-10-12 14:51:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
Richard Huxton wrote:
> Yes, but network timeouts will be of the order of several minutes - 
> hours. You're not holding your locks for that long are you? Are you 
> really saying your SELECT FOR UPDATE queries can take more than a 
> couple of seconds to complete?
yes normally not, but it can happened. let something goes wrong, for
example the network is busy or the db server is busy or something like
that. if the number of request to a server is high enough it will be slow.
whatever it isn't a certain event for locks.

> All I'm saying is around "SELECT ... FOR UPDATE" you put two "SET 
> statement_timeout" to set a short timeout and then revert it.
yes it is clear what you mean but it can also make trouble and a
deadlock if the timeout is the short for the request.

>> and it seems as if this should be a problem with postgres :-(
> Perhaps - you can apply NOWAIT to "LOCK TABLE" and I think in 8.1 to 
> "SELECT FOR UPDATE" also. That's not much use if you're stuck with 8.0 
> for the moment though. It also doesn't actually change the logic of 
> the code above.
i had read it and i had trouble with the beta so i us the stable version.
but NOWAIT is a certain event for locks, the timeout isn't one.

In response to

pgsql-odbc by date

Next:From: Thomas RokohlDate: 2005-10-12 14:51:48
Subject: Re: lock - feedback
Previous:From: Merlin MoncureDate: 2005-10-12 14:18:32
Subject: Re: lock - feedback

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group