Re: Problem Dropping a Database with users connected to it

From: Fernando Schapachnik <fernando(at)mecon(dot)gov(dot)ar>
To: Eric Dorland <eric(dot)dorland(at)mcgill(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem Dropping a Database with users connected to it
Date: 2005-01-14 16:37:47
Message-ID: 20050114163747.GI362@bal740r0.mecon.gov.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Just kill the processes. You can grep for postgres AND idle. It doesn't prevent
new connections, but doesn't look like an issue in your scenario. If you need
that, you can restart with a copy of pg_hba.conf that only allows localhost, do
your drop & recreate, and then restart again.

Regards.

En un mensaje anterior, Eric Dorland escribió:
> Hi,
>
> I'm basically trying to do what the subject says, through various means
> with no success. The basic situation is that every night we recreate our
> development database with a complete copy of our live data. The problem
> is some of the developers (well me especially) leave open connections to
> the DB at night, so the database drop fails. Now that's ok, but I need
> some sort of alternative... I thought of:
>
> * Disconnecting all other users before dropping the db, but that doesn't
> seem possible (I could start and stop the db, but that doesn't stop any
> clients from just reconnecting right away).

In response to

Browse pgsql-general by date

  From Date Subject
Next Message J. Greenlees 2005-01-14 16:39:28 ntfs for windows port rc5-2
Previous Message John Sidney-Woollett 2005-01-14 16:30:59 C locale + unicode