Unix Technical Forum

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

This is a discussion on dropdb: database removal failed: ERROR: database "database_name" is being accessed by other users within the pgsql Admins forums, part of the PostgreSQL category; --> This Error message was given when i was dropping the database. There are idle connections to the database as ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 01:24 AM
Gourish Singbal
 
Posts: n/a
Default dropdb: database removal failed: ERROR: database "database_name" is being accessed by other users

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

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 01:26 AM
Gourish Singbal
 
Posts: n/a
Default Re: dropdb: database removal failed: ERROR: database "database_name" is being accessed by other users

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@gmail.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

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:36 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com