pgcat: a PostgreSQL pooler

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • pgcat

    Discontinued PostgreSQL pooler with sharding, load balancing and failover support. [Moved to: https://github.com/postgresml/pgcat] (by levkk)

  • I created a pool called "yugabyte" (pools.yugabyte), with pool mode 'session', so that a session remains connected to a backend. I created a pool of servers in pools.yugabyte.shards.0 (yugabyte shards pool 0), with all three of the YSQL nodes in the YugabyteDB cluster, and gave one the role of "primary" and the two others the role of "replica". For YugabyteDB YSQL this does not make sense. Currently, pgcat allows to have the roles to be all "replica", but not have more than one "primary".

  • pgjdbc

    Postgresql JDBC Driver (by yugabyte)

  • Of course an external connection pool like this should only be used if you cannot use an application connection pool, and for the use of YugabyteDB, if you can use a YugabyteDB driver, such as our java jdbc driver, it's highly recommended to do so!

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • yugabyte-db

    YugabyteDB - the cloud native distributed SQL database for mission-critical applications.

  • I created a pool called "yugabyte" (pools.yugabyte), with pool mode 'session', so that a session remains connected to a backend. I created a pool of servers in pools.yugabyte.shards.0 (yugabyte shards pool 0), with all three of the YSQL nodes in the YugabyteDB cluster, and gave one the role of "primary" and the two others the role of "replica". For YugabyteDB YSQL this does not make sense. Currently, pgcat allows to have the roles to be all "replica", but not have more than one "primary".

  • PostgreSQL

    Mirror of the official PostgreSQL GIT repository. Note that this is just a *mirror* - we don't work with pull requests on github. To contribute, please see https://wiki.postgresql.org/wiki/Submitting_a_Patch

  • Please mind that the default setting binds to port 5432 on all network interfaces, which can conflict with a local running PostgreSQL database. The port can be set using port = 6432 (example for using the default pgbouncer port). Also mind that YugabyteDB by default binds to port 5433.

  • pgbouncer

    lightweight connection pooler for PostgreSQL

  • pgcat is a connection pool like pgbouncer, and shares part of the logical way it's working, but it has a fundamental difference: it allows to use multiple databases for a single client connection. pgbouncer only ever connects a client to a single database. It should be mentioned that there is a way to perform load balancing by using the pgbouncer so_reuseport setting to allow multiple pgbouncers to run on the same port.

  • Cargo

    The Rust package manager

  • Now that the configuration is done, run pgcat using cargo:

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts