Re: How to force disconnections from a Perl script?
Вложения
В списке pgsql-general по дате отправления:
| От | Martijn van Oosterhout |
|---|---|
| Тема | Re: How to force disconnections from a Perl script? |
| Дата | |
| Msg-id | 20070219163413.GG30737@svana.org обсуждение |
| Ответ на | How to force disconnections from a Perl script? ("Kynn Jones" <kynnjo@gmail.com>) |
| Ответы |
Re: How to force disconnections from a Perl script?
|
| Список | pgsql-general |
On Mon, Feb 19, 2007 at 11:10:55AM -0500, Kynn Jones wrote: > The script is quite solid and has been performing flawlessly for > several months now, with one exception: it fails irrecoverably > whenever some user forgets to disconnect from mydb at the time that > the script attempts to delete it (or rename it, for that matter). The > error is "ERROR: database "mydb" is being accessed by other users". Why irrecoverably? If the command fails, you just wait and try it again. You could use the pg_stat tables to work out who is connected and use pg_cancel_backend() to kill them. You could "kill -INT" them yourself. You could change the pg_hba.conf to forbid logging in and then bouncing the server. Hope this gives you some ideas. -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to litigate.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера