Skip to content


Switch branches/tags

Latest commit

This commit introduces builtin shell functions to provide minimal
command line completion for `pgagroal-cli` and `pgagroal-admin`.

A new directory `contrib/shell_comp` has been added, and within that
the files `pgagroal_comp.<shell>` are placed.
In particular:
- `pgagroal_comp.bash` provides completion for the Bash shell;
- `pgagroal_comp.zsh` provides the same completion for the Zsh shell.

Documentation updated to explain how to use such completions.

Close #291

Git stats


Failed to load latest commit information.
Latest commit message
Commit time


pgagroal is a high-performance protocol-native connection pool for PostgreSQL.

Pronounced: p-g-a-gro-al, named after Agroal in Portugal.


  • High performance
  • Connection pool
  • Limit connections for users and databases
  • Prefill support
  • Remove idle connections
  • Perform connection validation
  • Enable / disable database access
  • Graceful / fast shutdown
  • Prometheus support
  • Grafana 8 dashboard
  • Remote management
  • Authentication query support
  • Failover support
  • Transport Layer Security (TLS) v1.2+ support
  • Daemon mode
  • User vault

See Getting Started on how to get started with pgagroal.

See Configuration on how to configure pgagroal.

See Performance for a performance run.


pgagroal makes use of

  • Process model
  • Shared memory model across processes
  • libev for fast network interactions
  • Atomic operations are used to keep track of state
  • The PostgreSQL native protocol v3 for its communication

pgagroal will work with any PostgreSQL compliant driver, for example pgjdbc, Npgsql and pq.

See Architecture for the architecture of pgagroal.

Tested platforms

Compiling the source

pgagroal requires

dnf install git gcc cmake make libev libev-devel openssl openssl-devel systemd systemd-devel python3-docutils

Alternative clang 8+ can be used.

Release build

The following commands will install pgagroal in the /usr/local hierarchy and run the default configuration.

git clone
cd pgagroal
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
sudo make install
/usr/local/bin/pgagroal -c /usr/local/etc/pgagroal/pgagroal.conf -a /usr/local/etc/pgagroal/pgagroal_hba.conf

See RPM for how to build a RPM of pgagroal.

Debug build

The following commands will create a DEBUG version of pgagroal.

git clone
cd pgagroal
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
cd src
cp ../../doc/etc/*.conf .
./pgagroal -c pgagroal.conf -a pgagroal_hba.conf

Remember to set the log_level configuration option to debug5.


Contributions to pgagroal are managed on

Contributions are most welcome !

Please, consult our Code of Conduct policies for interacting in our community.

Consider giving the project a star on GitHub if you find it useful. And, feel free to follow the project on Twitter as well.