Re: force drop of database others are accessing

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: force drop of database others are accessing
Дата
Msg-id 20040124004111.GA13227@phlogiston.dyndns.org
обсуждение исходный текст
Ответ на force drop of database others are accessing  ("Lee Harr" <missive@hotmail.com>)
Список pgsql-general
On Sat, Jan 24, 2004 at 12:18:06AM +0000, Lee Harr wrote:
> Every once in a while my automated script fails because
> some other system which should have disconnected
> failed to unhook. The old data and old connection are
> not important to me. The new run needs to go through.

You can look for people connected and kick them out with kill -2 on
their pid.  The trick is to start your own script (which probably
isn't "failing" exactly, but blocking, right?), and then (since
you've locked the relevant objects that way, such that nobody else
can get in) use the shell to kill -2 other connections.  Evil and
possibly dangerous, but you said you didn't care about the old data.

A

--
Andrew Sullivan  | ajs@crankycanuck.ca
I remember when computers were frustrating because they *did* exactly what
you told them to.  That actually seems sort of quaint now.
        --J.D. Baldwin

В списке pgsql-general по дате отправления:

Предыдущее
От: "Lee Harr"
Дата:
Сообщение: force drop of database others are accessing
Следующее
От: Eric B.Ridge
Дата:
Сообщение: Re: Touch row ?