Re: Dead locks
От | Alfred Perlstein |
---|---|
Тема | Re: Dead locks |
Дата | |
Msg-id | 20010506174818.G18676@fw.wintelcom.net обсуждение исходный текст |
Ответ на | Dead locks (Aristide Aragon <aristide@lionking.org>) |
Список | pgsql-general |
* Aristide Aragon <aristide@lionking.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@freebsd.org] http://www.egr.unlv.edu/~slumos/on-netbsd.html
В списке pgsql-general по дате отправления: