pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedStop connections to a specific database
3+ messages / 3 participants
[nested] [flat]
* Stop connections to a specific database
@ 2008-07-18 15:07 Scott Whitney <swhitney@journyx.com>
0 siblings, 2 replies; 3+ messages in thread
From: Scott Whitney @ 2008-07-18 15:07 UTC (permalink / raw)
To: pgsql-admin
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?
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Stop connections to a specific database
@ 2008-07-18 16:03 Kevin Grittner <Kevin.Grittner@wicourts.gov>
parent: Scott Whitney <swhitney@journyx.com>
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Grittner @ 2008-07-18 16:03 UTC (permalink / raw)
To: Scott Whitney <swhitney@journyx.com>; pgsql-admin
>>> "Scott Whitney" <swhitney@journyx.com> wrote:
> I just want to stop connections to this
> one particular database.
>
> Is there a simple, preferred method for doing so?
It sounds like pg_hba.conf might be your ticket:
http://www.postgresql.org/docs/8.2/interactive/auth-pg-hba-conf.html
-Kevin
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Stop connections to a specific database
@ 2008-07-18 18:40 Rex Mabry <rexmabry@yahoo.com>
parent: Scott Whitney <swhitney@journyx.com>
1 sibling, 0 replies; 3+ messages in thread
From: Rex Mabry @ 2008-07-18 18:40 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2008-07-18 18:40 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-07-18 15:07 Stop connections to a specific database Scott Whitney <swhitney@journyx.com>
2008-07-18 16:03 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2008-07-18 18:40 ` Rex Mabry <rexmabry@yahoo.com>
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