Thread: Releasing locks

Releasing locks

From
GH
Date:
Is there some way for Postgres to recover from "frozen" locks?
Ex:

PHP opens a persistent connection to the database.
Script queries and recieves a lock.
Something happens so that the lock is not released.

Other scripts are forced to wait for locks.

How can I make it so that the corrupted script does not prevent
other scripts from receiving locks?
Is there some way to release the "bad" lock?

Thanks.

gh


Re: Releasing locks

From
Tom Lane
Date:
GH <grasshacker@over-yonder.net> writes:
> Is there some way to release the "bad" lock?

Kill the client holding it.

In a persistent-connection environment, you'd have to ensure that any
connection that client had open was closed, not just recycled to the
free pool.  Hmm, another thing I bet PHP doesn't do ...

            regards, tom lane

Re: Releasing locks

From
GH
Date:
On Sat, Nov 25, 2000 at 05:53:31PM -0500, some SMTP stream spewed forth:
> GH <grasshacker@over-yonder.net> writes:
> > Is there some way to release the "bad" lock?
>
> Kill the client holding it.
>
> In a persistent-connection environment, you'd have to ensure that any
> connection that client had open was closed, not just recycled to the
> free pool.  Hmm, another thing I bet PHP doesn't do ...
>

AOLServer is looking much better, at least for our database stuff.
Funny, PHP works rather well with MySQL... ;-)
(No harm intended to zealots of either PHP or MySQL. Heck, my job
practically depends on PHP, but I wish it would *work* when I need it
too.)

Yet again, our hero Tom Lane rescues the hapless newbies.

Thanks.
gh


>             regards, tom lane