Is a connection to pgbouncer cheaper than a connection to PostgreSQL (assuming pgbouncer has already established a connection to PostgreSQL) ? How is the connection to pgbouncer made ? I found the documentation a bit unclear.

有帮助吗?

解决方案

PgBouncer speaks the normal PostgreSQL protocol. So a client application connects to PgBouncer normally, except by specifying the host and port where PgBouncer runs instead of the host and port where the PostgreSQL server runs. (The default port of PgBouncer is 6432.)

If PgBouncer has already established connections to the PostgreSQL backend, then opening a new connection from the client to PgBouncer is very fast. That is one of several reasons to use PgBouncer.

许可以下: CC-BY-SA归因
不隶属于 dba.stackexchange
scroll top