功能

pgbouncer 官方介绍: Lightweight connection pooler for PostgreSQL

To enable systemd integration, use the configure option --with-systemd. This allows using Type=notify service units as well as socket activation. See etc/pgbouncer.service and etc/pgbouncer.socket for examples.

在ubuntu上安装后, 发现重启后没有重新启动, 使能系统服务走一波

  1. # 启动服务
  2. $ sudo systemctl start pgbouncer.service
  3. # 配置为开机启动
  4. $ sudo systemctl enable pgbouncer.service
  5. pgbouncer.service is not a native service, redirecting to systemd-sysv-install
  6. Executing /lib/systemd/systemd-sysv-install enable pgbouncer
  7. $ sudo /lib/systemd/systemd-sysv-install enable pgbouncer

参考资料

  1. https://www.pgbouncer.org/