Re: lock a database from new connections, without modifying pg_hba.conf

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: lock a database from new connections, without modifying pg_hba.conf
Date: 2006-05-18 20:27:54
Message-ID: 20570.1147984074@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Marc G. Fournier" <scrappy(at)postgresql(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Mario Splivalo 2006-05-19 11:51:39 Reclaiming used disk space
Previous Message ashok@kalculate.com 2006-05-18 17:54:00 find out all users under specific user