In the last three recipes of this chapter, we have seen how to install pgBouncer and the parameters that need to be configured appropriately. In this recipe, we shall see some of the simple commands to start, stop, and reload pgBouncer manually and through services.
Getting ready...
To start or stop pgBouncer successfully, we must install pgBouncer and set all the parameters correctly. So, the prerequisite is to ensure that the three previously discussed recipes are successfully implemented.
How to do it...
Here are the steps to start, stop, and reload a pgBouncer instance:
- The following command can be used to start pgBouncer using a service:
$ sudo systemctl start pgbouncer
- The following command can be used to start pgBouncer manually. The command-line argument -d would daemonize pgBouncer:
$ su - pgbouncer
$ /usr/bin/pgbouncer -d /etc/pgbouncer/pgbouncer.ini
- The following command can be used to stop pgBouncer using a service:
$ sudo systemctl...