Re: lock a database from new connections, without modifying pg_hba.conf - Mailing list pgsql-admin

From Tom Lane
Subject Re: lock a database from new connections, without modifying pg_hba.conf
Date
Msg-id 20570.1147984074@sss.pgh.pa.us
Whole thread Raw
In response to lock a database from new connections, without modifying pg_hba.conf  ("Marc G. Fournier" <scrappy@postgresql.org>)
Responses Re: lock a database from new connections, without modifying pg_hba.conf  (adey <adey11@gmail.com>)
List pgsql-admin
"Marc G. Fournier" <scrappy@postgresql.org> writes:
> Is that possible?  I've checked the docs for 8.1, and am not finding
> anything, nor anything in contrib ...

> the best I've been able to think of so far is to modify pg_hba.conf to not
> allow new connections for the duration of the operations I need to perform
> (drop and create a database) ...

Not sure I understand what you need.  DROP DATABASE already locks out
new connections.

            regards, tom lane

pgsql-admin by date:

Previous
From: "ashok@kalculate.com"
Date:
Subject: find out all users under specific user
Next
From: Mario Splivalo
Date:
Subject: Reclaiming used disk space