Review the sample file in this directory. Remove sample from the file name
- Remove
samplefrom filename
- Remove
sample - Copy to
~/.pg_service.conf - Edit the service info with your config
- Remove
samplefrom the sample file - Copy file content to
~/.pgpass(scripts will populate it as well) - Edit the file with your specific credentials
- Perform the following changes:
chown <user>:<group> /home/dir/.pgpass
chmod 0600 /home/dir/.pgpassReplace /home/dir with the path to the home directory of the user.
On PostgreSQL docker containers, that's /var/lib/postgresql/
For user and group on PostgreSQL docker containers, the user is postgres and the group is root
- Remove
sample - Copy to
~/.psqlrc
The mode that results in a more sane balance of improved concurrency and retained critical database features is transaction mode. From: PgBouncer is useful, important, and fraught with peril
- For 1.21.0, recommend
transactionpool mode (compatible with multi-statement transactions) - For macOS, install with Homebrew
- Copy changes from
pgbouncer.sample.inifile - Restart with
brew services restart pgbouncer