Re: dropdb: database removal failed: ERROR: database "database_name" is being accessed by other users

From: Gourish Singbal <gourish(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: dropdb: database removal failed: ERROR: database "database_name" is being accessed by other users
Date: 2005-02-23 05:41:41
Message-ID: 674d1f8a050222214138bc53b9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Guys,

postgres : 7.4.5
Os: linux

I need to restore my back up database with production data.
the steps i follow on backup database are:-
1) dropdb
2) createdb
3) psql or pg_restore to import data into the backup database.

Am i doing the correct steps?.

Problems:-
If some clients are connected to the backup database during the 1st
Step (dropdb)
the postmaster throws an error saying clients connected cannot drop database.

Any solution to the above problem would be great...

regards
gourish

On Mon, 21 Feb 2005 19:51:10 +0530, Gourish Singbal <gourish(at)gmail(dot)com> wrote:
> This Error message was given when i was dropping the database.
> There are idle connections to the database as seen from ps -ef | grep postgres
>
> How can i drop the database with out restarting the postgres server.?.
>
> FYI: i am dropping the database to perform restoration of this backup
> database using psql from production.
>
> --
> Best,
> Gourish Singbal
>

--
Best,
Gourish Singbal

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Sander Steffann 2005-02-23 08:01:41 Re: 64 bit rpms for 7.4.7??
Previous Message Tom Lane 2005-02-23 05:05:20 Re: 7.4.5 file write issue