PostgreSQL/PgBouncer: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Line 32: Line 32:
sudo rsync -avz /etc/pgbouncer/pgbouncer.ini /etc/pgbouncer/pgbouncer.ini.bkp
sudo rsync -avz /etc/pgbouncer/pgbouncer.ini /etc/pgbouncer/pgbouncer.ini.bkp
sudo rsync -avz /etc/pgbouncer/userlist.txt  /etc/pgbouncer/userlist.txt.bkp
sudo rsync -avz /etc/pgbouncer/userlist.txt  /etc/pgbouncer/userlist.txt.bkp
</syntaxhighlight>
<syntaxhighlight lang="bash">
    systemctl status  pgbouncer.service
sudo systemctl reload  pgbouncer.service
sudo systemctl restart pgbouncer.service
</syntaxhighlight>
</syntaxhighlight>



Revision as of 02:00, 19 September 2024

cat <<-'EXE'|sudo bash
apt-get update;echo
apt list -a --upgradable
sudo apt-get install -y pgbouncer
EXE
     systemctl status  pgbouncer.service

sudo systemctl stop    pgbouncer.service
sudo systemctl start   pgbouncer.service
sudo systemctl restart pgbouncer.service
 ls -lah /etc/pgbouncer/

sudo cat /etc/pgbouncer/userlist.txt
sudo cat /etc/pgbouncer/pgbouncer.ini
sudo cat /etc/pgbouncer/pgbouncer.ini|less

Configure

sudo rsync -avz /etc/pgbouncer/pgbouncer.ini /etc/pgbouncer/pgbouncer.ini.bkp
sudo rsync -avz /etc/pgbouncer/userlist.txt  /etc/pgbouncer/userlist.txt.bkp
     systemctl status  pgbouncer.service
sudo systemctl reload  pgbouncer.service
sudo systemctl restart pgbouncer.service

Playground

ls -lah /etc/pgbouncer/
ls -lah /var/log/postgresql/
ls -lah /var/run/postgresql/

References