X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 3AD329F946D; Sat, 20 May 2006 12:55:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 43631-09; Sat, 20 May 2006 12:55:23 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from coe.tamu.edu (edsun.coe.tamu.edu [165.91.232.6]) by postgresql.org (Postfix) with ESMTP id 8779C9F9316; Sat, 20 May 2006 12:55:22 -0300 (ADT) Received: (from root@localhost) by bruner.coe.tamu.edu (8.13.1/8.13.1) id k4KFskmi021247; Sat, 20 May 2006 10:54:46 -0500 Received: from coe.tamu.edu (coe.tamu.edu [165.91.232.6]) by coe.tamu.edu (8.11.7p2+Sun/8.12.11) with ESMTP id k4KFsTc05951; Sat, 20 May 2006 10:54:29 -0500 (CDT) Date: Sat, 20 May 2006 10:54:29 -0500 (CDT) From: "Ben K." To: "Marc G. Fournier" cc: pgsql-admin@postgresql.org Subject: Re: lock a database from new connections, without modifying In-Reply-To: <20060518141816.Q1145@ganymede.hub.org> Message-ID: References: <20060518141816.Q1145@ganymede.hub.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by AMaViS 0.3.12 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/281 X-Sequence-Number: 21813 > 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) ... Just in case ... update pg_catalog.pg_database set datallowconn = false where datname = '...'; http://archives.postgresql.org/pgsql-docs/2004-11/msg00015.php http://www.postgresql.org/docs/8.1/interactive/manage-ag-templatedbs.html My twopence. Ben K. Developer http://benix.tamu.edu