pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ben K. <bkim@coe.tamu.edu>
To: Marc G. Fournier <scrappy@postgresql.org>
Cc: pgsql-admin@postgresql.org
Subject: Re: lock a database from new connections, without modifying
Date: Sat, 20 May 2006 10:54:29 -0500 (CDT)
Message-ID: <Pine.GSO.4.64.0605201051060.3823@coe.tamu.edu> (raw)
In-Reply-To: <20060518141816.Q1145@ganymede.hub.org>
References: <20060518141816.Q1145@ganymede.hub.org>

> 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



view thread (5+ messages)  latest in thread

Message-ID: <Pine.GSO.4.64.0605201051060.3823@coe.tamu.edu>
Permalink:  ../Pine.GSO.4.64.0605201051060.3823@coe.tamu.edu/
Also on:    postgresql.org/message-id/Pine.GSO.4.64.0605201051060.3823@coe.tamu.edu

 · 

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: bkim@coe.tamu.edu, scrappy@postgresql.org
  Subject: Re: lock a database from new connections, without modifying
  In-Reply-To: <Pine.GSO.4.64.0605201051060.3823@coe.tamu.edu>
  References: <20060518141816.Q1145@ganymede.hub.org> <Pine.GSO.4.64.0605201051060.3823@coe.tamu.edu>

* 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