Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 50CC56500FB for ; Fri, 18 Jul 2008 15:40:52 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 40609-07 for ; Fri, 18 Jul 2008 15:40:47 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from web35908.mail.mud.yahoo.com (web35908.mail.mud.yahoo.com [66.163.179.192]) by postgresql.org (Postfix) with SMTP id DA4BA6500D5 for ; Fri, 18 Jul 2008 15:40:48 -0300 (ADT) Received: (qmail 87290 invoked by uid 60001); 18 Jul 2008 18:40:47 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Message-ID; b=qudjduF4RsahAoHZx4IUpwih3e3HXY7NpbJZDSUfA8BIjEnpPZgIxbMI7MwUDBrrL/I9qLfGkeNqbMzcXhQvK5SVZ1M17v/C0N1uLx5QeOw9bvs3Pc8+oITlmFY71jXb25nOdtKMcv79f5edc6pxlqsyooPgy2jSDwORpTlHeYY=; Received: from [199.200.10.52] by web35908.mail.mud.yahoo.com via HTTP; Fri, 18 Jul 2008 11:40:47 PDT X-Mailer: YahooMailWebService/0.7.218 Date: Fri, 18 Jul 2008 11:40:47 -0700 (PDT) From: Rex Mabry Reply-To: rexmabry@yahoo.com Subject: Re: Stop connections to a specific database To: pgsql-admin@postgresql.org In-Reply-To: <20080718150744.D5E22ABCC8C@mail.int.journyx.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1361507620-1216406447=:86522" Message-ID: <410024.86522.qm@web35908.mail.mud.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200807/165 X-Sequence-Number: 29775 --0-1361507620-1216406447=:86522 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable You can update your pg_hba.conf file.=A0 Change the database column to list= the one database. =A0 # DATABASE can be "all", "sameuser", "samerole", a database name, or # a comma-separated list thereof. =A0 Assuming you database is called "mydb and you enter the connecting from IP,= it should look like this. # TYPE=A0 DATABASE=A0=A0=A0 USER=A0=A0=A0=A0=A0=A0=A0 CIDR-ADDRESS=A0=A0=A0= =A0=A0=A0=A0=A0=A0 METHOD host=A0=A0=A0=A0=A0=A0=A0=A0 mydb=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0all=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 10.0.0.0/32=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 md5 =A0 After that, do a=A0pg_ctl reload --- On Fri, 7/18/08, Scott Whitney wrote: From: Scott Whitney Subject: [ADMIN] Stop connections to a specific database To: pgsql-admin@postgresql.org Date: Friday, July 18, 2008, 10:07 AM I'm migrating a pg server (v 8.1.4) this weekend, and I have 2 dbs left on it. One cannot be shut down until tomorrow. The last remaining one, I can migrate today. However, the software that talks to it is somewhat "hinky" and has several places that connect -- there is no overall consolidated connection information. To ensure this is working properly, I want to disable connections to that d= b on the old server while using the new one for testing, to ensure everything is properly working. Given the fact that the other db must remain live on this old server during that time, I just want to stop connections to this one particular database. Is there a simple, preferred method for doing so? --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin=0A=0A=0A --0-1361507620-1216406447=:86522 Content-Type: text/html; charset=us-ascii

You can update your pg_hba.conf file.  Change the database column to list the one database.

 

# DATABASE can be "all", "sameuser", "samerole", a database name, or
# a comma-separated list thereof.

 

Assuming you database is called "mydb and you enter the connecting from IP, it should look like this.

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
host         mydb            all            10.0.0.0/32                  md5

 

After that, do a pg_ctl reload



--- On Fri, 7/18/08, Scott Whitney <swhitney@journyx.com> wrote:

From: Scott Whitney <swhitney@journyx.com>
Subject: [ADMIN] Stop connections to a specific database
To: pgsql-admin@postgresql.org
Date: Friday, July 18, 2008, 10:07 AM

I'm migrating a pg server (v 8.1.4) this weekend, and I have 2 dbs left on
it. One cannot be shut down until tomorrow. The last remaining one, I can
migrate today.

However, the software that talks to it is somewhat "hinky" and has
several
places that connect -- there is no overall consolidated connection
information.

To ensure this is working properly, I want to disable connections to that db
on the old server while using the new one for testing, to ensure everything
is properly working. Given the fact that the other db must remain live on
this old server during that time, I just want to stop connections to this
one particular database.

Is there a simple, preferred method for doing so?



-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

--0-1361507620-1216406447=:86522--