Pergunta

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.

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a dba.stackexchange
scroll top