I have configured pgbouncer on server A(port 6432, host addr: 10.XX.XX.92) that will accept the connections for postgres server running on server B(port 5433, host addr:10.XX.XX.90). This postgres server has 2 databases.(postgres and db1)
I have 2 different type of users(user1, user2) that will connect to same database(db1). These both users have different set of permissions on db1.
Below is the sample of how I have configured pgbouncer.ini file.
database1 = host=10.XX.XX.90 port=5433 user=user1 password='pwd1' dbname=db1
database2 = host=10.XX.XX.90 port=5433 user=user2 password='pwd2' dbname=db1
Now when I try to connect to this database through pgAdmin it gives me an error of "No such database" .
Below are the connection variables that I used to connect through pgadmin for user1.
host = 10.XX.XX.92
port = 6432
maintenance database = database1
username = user1
password = pwd1
But when I use same variables and try to connect using DBeaver or psql, I am able to connect to the database db1 successfully.
Does anyone know if this is just pgAdmin issue or am I missing something here.
Note: There is one more thing I tried. If in the pgbouncer.ini, I name the database variable(database1) same as actual database name(db1), pg Admin lets me connect to the database. This would have worked for me if I just had one user connecting to the database but I have two users and they both can't have same connection name in the config file.
5433
and6432
. – J Spratt