1

This pgbouncer.ini setting can't start pgbouncer:

[databases]
mydb = host=127.0.0.1 port=5432 dbname=mydb

[pgbouncer]
listen_port = 6432
listen_addr = 127.0.0.1
auth_type = md5
auth_file = userlist.txt
logfile = /var/log/pgbouncer/pgbouncer.log
pidfile = /var/run/pgbouncer/pgbouncer.pid
admin_users = someuser

No pid file generated, no log file created. No process running(ps aux | grep pgbouncer).

But if set logfile and pidfile to:

logfile = pgbouncer.log
pidfile = pgbouncer.pid

pgbouncer can be started by run pgbouncer -d pgbouncer.ini. It will create log file and pid file at the same path of pgbouncer.ini.

I am using normal user doing it.

1 Answer 1

2

Either you don't have permission to write to /var/log/pgbouncer as the user you are running as, or the directory doesn't exist and pgbouncer doesn't or can't create it.

A third possibility is that the permissions on that directory are TOO relaxed, but I don't think pgbouncer checks that.

1
  • Thank you. I have to install PostgreSQL server and do it by postgres user.
    – rawmain
    Commented Mar 6, 2020 at 9:32

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.