BSD Ports

databases/pgbouncer 1.23.1 DragonFly

Lightweight connection pooler for PostgreSQL

System
DragonFly
Repository
DPorts
Maintainer
[email protected] (as in FreeBSD)
License
BSD2CLAUSE
Categories
databases
Package size
188.0 KiB, 469.5 KiB installed

Description

PgBouncer is a PostgreSQL connection pooler. Any target application can be connected to PgBouncer as if it were a PostgreSQL server, and PgBouncer will create a connection to the actual server, or it will reuse one of its existing connections.

The aim of PgBouncer is to lower the performance impact of opening new connections to PostgreSQL.

In order not to compromise transaction semantics for connection pooling, PgBouncer supports several types of pooling when rotating connections:

* Session pooling

Most polite method. When a client connects, a server connection will be assigned to it for the whole duration it stays connected. When the client disconnects, the server connection will be put back into pool. This mode supports all PostgreSQL features.

* Transaction pooling

A server connection is assigned to a client only during a transaction. When PgBouncer notices that the transaction is over, the server will be put back into the pool.

This mode breaks a few session-based features of PostgreSQL. You can use it only when the application cooperates by not using features that break. See the table below for incompatible features.

* Statement pooling

Most aggressive method. This is transaction pooling with a twist: Multi-statement transactions are disallowed. This is meant to enforce %e2%80%9cautocommit%e2%80%9d mode on the client, mostly targeted at PL/Proxy.

In the other systems

SystemPortVersion
DragonFlydatabases/pgbouncer1.23.1
FreeBSDdatabases/pgbouncer1.25.1_1
OpenBSDdatabases/pgbouncer1.26.1p0
NetBSDdatabases/pgbouncer1.22.1
HardenedBSDdatabases/pgbouncer1.25.1_1
GhostBSDdatabases/pgbouncer1.25.1_1

Install

Binary package:

pkg install pgbouncer

From DPorts:

cd /usr/dports/databases/pgbouncer && make install clean

Dependencies

Run dependencies 2

No port depends on this one.

Configuration

No options to configure.

Service scripts
none

Message after installing

To setup pgbouncer you need to edit the configuration file:
      /usr/local/etc/pgbouncer.ini

      You will also need to define the list of allowed users as
      per the pgbouncer(5) man page. See the sample file:
      /usr/local/etc/pgbouncer.users.sample

      To run pgbouncer from startup, add pgbouncer_enable="YES"
      in your /etc/rc.conf.