Pgbouncer
Jump to navigation
Jump to search
Install
apt install pgbouncer
create role someuser; create role someadmin; ALTER ROLE someadmin WITH PASSWORD 'test'; ALTER ROLE someuser WITH PASSWORD 'test'; ALTER ROLE someuser WITH login; ALTER ROLE someadmin WITH login SUPERUSER;
Update userlist.txt
sudo -u postgres psql -Atq -U postgres -d postgres -c "SELECT concat('\"', usename, '\" \"', passwd, '\"') FROM pg_shadow" > /etc/pgbouncer/userlist.txt
Reestart
service restart pgbouncer