1

Recently I faced strange error. I'm running Postgresql behind pgBouncer. I created new database in pgAdmin (connected through pgBouncer). It shows up on the list, but when I try to select it I get error "Database not exists". When I SSH and psql directly to db, than this DB exists. Also when I connect pgAdmin directly to the postgresql I have no problem.

Here are few details about configuration:

  • PostgreSQL 9.5 on Ubuntu server 16.04

  • pgBouncer 1.7 (I connect pgAdmit through it)

  • pgAdmin 1.4

  • I login with user name with all privileges (including superuser)

This is my first time when I use pgBouncer, so I suspect there is the problem.

joanolo
13.7k8 gold badges39 silver badges67 bronze badges
asked May 20, 2017 at 16:43

1 Answer 1

2

Ok.. After some investigation I found where was mistake. So after adding new database it is required to edit pgbouncer.ini file and manualy add this database in [databases] section. Example:

We have followig databases:

  1. postgres
  2. example1
  3. example2

Than pgbouncer.ini should contain

[databases]
postgres = host=localhost dbname=postgres
example1 = host=localhost dbname=example1
example2 = host=localhost dbname=example2
answered May 20, 2017 at 20:33

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.