0

my question is about the number of Postgres Databse pgpool can manage. I have two servers:

Node 1:
     pgpool
     postgreSQL
Node 2:
     postgreSQL

I have two database: DB1 and DB2.

I can connect from app server to DB1 throught pgpool on port 9999, but i cant connect to DB2 on port 9999.

If I try to connect on port 5432 to DB2 it works fine.

My question is if can pgpool work with two database or only can connect one of them.

Lukasz Szozda
  • 162,964
  • 23
  • 234
  • 275
  • pgpool can definitely work with 2 databases. Check your settings in pgpool.conf. What kind of replication do you have from DB1 to DB2? Refer http://www.pgpool.net/docs/latest/pgpool-en.html and use the appropriate sample configuration file (stream/master-slave...).. – Jayadevan Apr 28 '15 at 04:22
  • Hi Jayadevan, I think I don't explained fine with the settings. I have two servers: node1 and node2. I have two databases DB1 and DB2. DB1 is at node1 replicated on node2. DB2 is another different database at node1, replicated too on node2. thanks a lot – juaruelo Apr 28 '15 at 14:08
  • In such a set up, how are you planning to direct the queries to DB1 or DB2? There has to be some 'intelligence' somewhere which decides that Query1 and 2 should go to DB1and Query 3 and 4 should go to DB2? – Jayadevan Apr 28 '15 at 14:55

2 Answers2

0

pgpool connects directly to primary postgres node in this case node 1 and if any failover occurs it promotes standby node (node 2 ) and it connects directly to that particular node.

venky
  • 1
0

Yes, Pgpool-II can work with multiple databases. It should be able to connect to both DB1 and DB2 simultaneously. If you're unable to connect to DB2 through Pgpool on port 9999 but can connect directly on port 5432, there might be a configuration or network issue that needs to be addressed. Check your Pgpool configuration, connection pooling settings, load balancing settings, firewall settings, and network connectivity to troubleshoot the problem.