Вопрос

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