Re: Droping a database even if someone is connected
От | Oliver Elphick |
---|---|
Тема | Re: Droping a database even if someone is connected |
Дата | |
Msg-id | 1047798520.8983.202.camel@linda.lfix.co.uk обсуждение исходный текст |
Ответ на | Droping a database even if someone is connected (Eric Audet <eaudet@scc.ca>) |
Ответы |
Re: Droping a database even if someone is connected
|
Список | pgsql-general |
On Thu, 2003-03-13 at 19:19, Eric Audet wrote: > Is there a way to drop a database even if someone is connected to it? > > I use a perl script that > 1) drop the database, (dropdb) > 2) create a new database, (createdb) > 3) restore a database from a dump (psql databasename <dumpfile) > > When the drop does not work, everything else fails! If 1) fails, identify the relevant backend process and kill it. Then try again. -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight, UK http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C ======================================== "Bless them which persecute you; bless, and curse not. Rejoice with them that do rejoice, and weep with them that weep. Recompense to no man evil for evil. Provide things honest in the sight of all men." Romans 12:14,15,17
В списке pgsql-general по дате отправления: