Edit /etc/default/pgbouncer
and set
START=1
Then start pgbouncer
using the init script:
/etc/init.d/pgbouncer start
The init script will automatically start pgbouncer on boot. But you need to make that START=1
setting.
Вопрос
On Ubuntu 12.04 (precise) in a Windows Azure VM I have postgres and pgbouncer running on the same machine. Everything is setup and works however when the VM is rebooted pgbouncer doesn't automatically startup.
The commands I run to get it started are the below. Note: I need to be 'postgres' user in order to start the service otherwise it fails. Also detailed answer preferrend. Linux isn't my normal OS.
sudo su postgres
pgbouncer -d -v /etc/pgbouncer/pgbouncer.ini
If helpful, this is how pgbouncer was installed:
sudo apt-get install postgresql-9.3 pgbouncer
Note: I can interact with pgbouncer service (force-reload, status, start, stop) however only after I first run the pgbouncer -d -v /etc/pgbouncer/pgbouncer.ini
command.
Решение
Edit /etc/default/pgbouncer
and set
START=1
Then start pgbouncer
using the init script:
/etc/init.d/pgbouncer start
The init script will automatically start pgbouncer on boot. But you need to make that START=1
setting.