pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gourish Singbal <gourish@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Re: dropdb: database removal failed: ERROR: database "database_name" is being accessed by other users
Date: Wed, 23 Feb 2005 11:11:41 +0530
Message-ID: <674d1f8a050222214138bc53b9@mail.gmail.com> (raw)
In-Reply-To: <674d1f8a0502210621233cf44e@mail.gmail.com>
References: <674d1f8a0502210621233cf44e@mail.gmail.com>

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



view thread (5+ messages)  latest in thread

Message-ID: <674d1f8a050222214138bc53b9@mail.gmail.com>
Permalink:  ../674d1f8a050222214138bc53b9@mail.gmail.com/
Also on:    postgresql.org/message-id/674d1f8a050222214138bc53b9@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: gourish@gmail.com
  Subject: Re: dropdb: database removal failed: ERROR: database "database_name" is being accessed by other users
  In-Reply-To: <674d1f8a050222214138bc53b9@mail.gmail.com>
  References: <674d1f8a0502210621233cf44e@mail.gmail.com> <674d1f8a050222214138bc53b9@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox