From: | Alfred Perlstein <bright(at)wintelcom(dot)net> |
---|---|
To: | Aristide Aragon <aristide(at)lionking(dot)org> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Dead locks |
Date: | 2001-05-07 00:48:19 |
Message-ID: | 20010506174818.G18676@fw.wintelcom.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
* Aristide Aragon <aristide(at)lionking(dot)org> [010506 17:40] wrote:
> Hello
> This question isn't about deadlocks, instead, it's about something
> I've been wondering because of a program I'm doing that uses locks.
> My progrm uses begin and commit (or rollback) and locks a table
> in exclusive mode. What'd happen if the program unexpectedly died?
> How would the database recover from a lock without a commit or
> rollback? Would the database release the lock automatically, would
> it be in deadlock or would I have to release it by hand, and if so
> how?
Please wrap lines at 70 characters.
The database _should_ detect that the client has died because the
database connection is usually a stream socket which notifies end
points of disconnect/timeout. Once it detects that it _should_ be
able to abort the current transaction and as part of that drop any
locks held in that transaction.
It _should_ but I'm not sure it does.
--
-Alfred Perlstein - [alfred(at)freebsd(dot)org]
http://www.egr.unlv.edu/~slumos/on-netbsd.html
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-05-07 01:06:44 | Re: Dead locks |
Previous Message | Tom Lane | 2001-05-07 00:06:45 | Re: I lost the pg_control file |