pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jerry Sievers <gsievers19@comcast.net>
To: Arjun Ranade <ranade@nodalexchange.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Connection pooling for differing databases?
Date: Thu, 07 Mar 2019 14:03:20 -0600
Message-ID: <87h8ce5u5z.fsf@jsievers.enova.com> (raw)
In-Reply-To: <CANrrCRzh-mJx4nmsn4Av5dH7S=9ONoQY=rzn8CnkNp_mOEBSNg@mail.gmail.com>
References: <CANrrCRzh-mJx4nmsn4Av5dH7S=9ONoQY=rzn8CnkNp_mOEBSNg@mail.gmail.com>

Arjun Ranade <ranade@nodalexchange.com> writes:

> Hi all,
>
> I'm wondering if there's a tool like pgpool that can provide a single
> origin point (host/port) that will proxy/direct connections to the
> specific servers that contain the db needing to be accessed.
>
> For example... lets say we had two databases: db1.company.com:5432
> and db2.company.com:5433
>
> Db1 has the database: env1
> Db2 has the database: env2
>
> Is there a tool that will accept connections, so that when users
> connect they see there are two databases they can go to: env1 and
> env2. 

No, not at least the "they can see 2 DBs" portion of your req.

PgBouncer can route traffic on behalf of multiple server/DBs by
configuration but AFAIK even administrator access to the special
endpoint 'pgbouncer' does *not* list all possible DBs unless they are in
use and/or recently enough used to be still shown by 'show databases'.

Direct consultation of the INI file would be required... ergo, there is
nothing equivalent to psql -l.

Disclaimer: I do *not* have recent experience with PgPool as-if to
weigh-in there, but likely someone else will.

HTH


>
> If they choose to connect to the env1 db, it routes all traffic to 
> db1.company.com:5432 and if they choose env2 it routes them to 
> db2.company.com:5433
>
> Of course there would have to be some requirement such as the
> databases on any given server cannot have name collisions with
> database names on another server, etc.  Is there a way to do
> something like this?
>
> Thanks,
> Arjun
>
>

-- 
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net




view thread (6+ messages)  latest in thread

Message-ID: <87h8ce5u5z.fsf@jsievers.enova.com>
Permalink:  ../87h8ce5u5z.fsf@jsievers.enova.com/
Also on:    postgresql.org/message-id/87h8ce5u5z.fsf@jsievers.enova.com

 · 

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-general@postgresql.org
  Cc: gsievers19@comcast.net, ranade@nodalexchange.com
  Subject: Re: Connection pooling for differing databases?
  In-Reply-To: <87h8ce5u5z.fsf@jsievers.enova.com>
  References: <CANrrCRzh-mJx4nmsn4Av5dH7S=9ONoQY=rzn8CnkNp_mOEBSNg@mail.gmail.com> <87h8ce5u5z.fsf@jsievers.enova.com>

* 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