Getting Started with PgBouncer
This article describes how to get started using PgBouncer on the Instaclustr managed platform. PgBouncer is a program that sits on top of PostgreSQL to enable connection pooling, allowing the cluster to serve more clients simultaneously and offering improved performance in certain workloads. There are two ways to start using PgBouncer on the platform: Creating a new PostgreSQL cluster with PgBouncer enabled; or enabling PgBouncer on an existing PostgreSQL cluster.
Creating a new cluster
For a complete step-by-step guide on how to create a new PostgreSQL cluster, please refer to this article. When creating a PostgreSQL cluster, PgBouncer can be enabled on the ‘PostgreSQL Setup’ page in the ‘Enterprise Add-Ons sections’, as can be seen below.
Simply click on the PgBouncer checkbox to bring up the configuration options. This allows selection of the PgBouncer version to be used and whether to use transaction or session pooling (described in more detail in Using PgBouncer).
Once happy with the PgBouncer configuration, simply click Next to continue with setting up the PostgreSQL cluster as per the usual process.
Adding PgBouncer to an existing cluster
If you want to add PgBouncer to an existing PostgreSQL cluster, please raise a support request.
After creating a PostgreSQL cluster with PgBouncer enabled, the next step is to add the necessary firewall rules and connect to your cluster. For more information on how to do that, please see Using PgBouncer.