Re: Connection pooling for differing databases? - Mailing list pgsql-general

From Fabrízio de Royes Mello
Subject Re: Connection pooling for differing databases?
Date
Msg-id CAPfkCSDaPpsXCXks0xsfh81DQ=oWN_Lj+o-XQOyhDjN5xstDvw@mail.gmail.com
Whole thread Raw
In response to Connection pooling for differing databases?  (Arjun Ranade <ranade@nodalexchange.com>)
List pgsql-general

Em qui, 7 de mar de 2019 às 16:10, Arjun Ranade <ranade@nodalexchange.com> escreveu:
>
> 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.
>
> 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?
>

Yeap, pgbouncer do that. See "databases" configuration section [1].

Regards,

[1] https://pgbouncer.github.io/config.html#section-databases

--
   Fabrízio de Royes Mello         Timbira - http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

pgsql-general by date:

Previous
From: Arjun Ranade
Date:
Subject: Connection pooling for differing databases?
Next
From: Moreno Andreo
Date:
Subject: Re: Connection pooling for differing databases?