pgbouncerLightweight connection pooler for PostgreSQL
1.25.1_1databasesΣ=5 1.25.1_1Version of this port present on the latest quarterly branch.upstream: 1.26.1A newer version was found upstream by portscout, first on 2026-10-15.
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
"autocommit" mode on the client, mostly targeted at PL/Proxy.
===> The following configuration options are available for pgbouncer-1.25.1_1:
CARES=off: Asynchronous DNS resolution via c-ares
MANPAGES=on: Build and/or install manual pages
===> Use 'make config' to modify these settings
databases/pgbouncer: Add default option MANPAGES
Port depends on hs-pandoc to build its manpages, that adds a dependency
on lang/ghc, which takes hours to build.
MANPAGES option save lots of build time for users who build their own
ports without MANPAGES.
While here fix build with custom USER/GROUP not from UIDs/GIDs.
PR: 295239
Approved by: Dmitry Wagin <dmitry.wagin@ya.ru> (maintainer, timeout 2 weeks)
Sponsored by: UNIS Labs
databases/pgbouncer: add a graceful stop command to rc script
The user can now terminate pgbouncer both with gracefulstop
(sends SIGINT) and with stop (sends SIGTERM).
PR: 271023
databases/pgbouncer: Update to 1.18.0
Maintainer yields maintainership in favor of submitter, already maintainer of
several ports.
ChangeLog: https://www.pgbouncer.org/changelog.html#pgbouncer-118x
* Add application_name to SHOW CLIENTS/SERVERS/SOCKETS output
* Add information about cancel requests to SHOW CLIENTS/SERVERS/POOLS output
* Fail sbuf_send_pending operation if destination socket is closed
* Fix a few possible crashes
* Fix for overflow bug in comma-separated host list feature, causing
connection to get re-routed to Unix socket
* Don’t evict connections to achieve min_pool_size
* Fix SHOW HELP with PostgreSQL 15
* Fix race condition in query cancelation handling. It was possible that a
query cancellation for one client canceled a query for another one. This
could happen when a cancel request was received by PgBouncer when the query
it was meant to cancel already completed by itself.
* Various CI updates
PR: 269499
Reported by: dmitry.wagin@ya.ru
Approved by: m.tsatsenko@gmail.com (maintainer)
Remove WWW entries moved into port Makefiles
Commit b7f05445c00f has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
(Only the first 15 lines of the commit message are shown above )
databases/pgbouncer: Fix config file
- No need to replace pgbouncer.log as the config mentions the absolute path
/var/log/pgbouncer/pgbouncer.log now
- No need to replace pgbouncer.pid as the config mentions the absolute path
/var/run/pgbouncer/pgbouncer.log now
- References to other files in /etc/ is changed with ${PREFIX}/etc specially
pgbouncer.users which had a reference to /etc directory
- No longer requires gsed so removed the BUILD_DEPENDS
- There was a pkg-message.in file which was not called using SUB_FILES; added
accordingly
PR: 259474
Approved by: m.tsatsenko@gmail.com (maintainer)
Sponsored by: Bounce Experts
.Fix build on 9.x.
Setting WITH_OPENSSL_PORT after including bsd.ports.pre.mk is a no-op, include
bsd.port.options.mk instead.
The 2016Q1 is unaffected by this bug.
PR: 207382
Submitted by: m.tsatsenko@gmail.com (maintainer)
databases/pgbouncer: Remove unnecessary dependency xmlto
It turns out that xmlto is not needed for documentation at all now.
The man pages are pregenerated and provided in the tarball.
PR: 192507
Reported by: dmitry2004 (yandex.ru)
databases/pgbouncer: Unconditionally install man pages
This port had a couple of issues besided installing man pages as a
function of the DOCS option selection. It also was using <pre> and <post>
inclusions with <options>, _DEPENDS were in multiple places.
I regrouped the *_DEPENDS, I moved the options to just above the make
targets (their conventional location) and I utilized <option>_*_DEPENDS
as well after fixing the man pages.
PR: 192507
Reported by: dmitry2004 (yandex.ru)
Approved by: Just Fix It (maintainer in copy)
Only use libevent2
Remove libevent as libevent2 is providing a good compatibility interface as well
as providing better performances.
Remove custom patches from libevent2 and install libevent2 the regular way
Mark ports abusing private fields of the libevent1 API as broken
Import a patch from fedora to have honeyd working with libevent2
Remove most of the patches necessary to find the custom installation we used to
have for libevent2
With hat: portmgr
- Fix minor issue from previous commit by changing from SUB_LIST to PLIST_SUB
PR: 189787
Reported by: Mikhail Tatsenko <m.tsatsenko@gmail.com> (maintainer)
Pointyhat to: swills
In the rc.d scripts, change assignments to rcvar to use the
literal name_enable wherever possible, and ${name}_enable
when it's not, to prepare for the demise of set_rcvar().
In cases where I had to hand-edit unusual instances also
modify formatting slightly to be more uniform (and in
some cases, correct). This includes adding some $FreeBSD$
tags, and most importantly moving rcvar= to right after
name= so it's clear that one is derived from the other.
Fix a few "bad example" problems in the rc.d scripts that have been
propogated by copy and paste.
1. Primarily the "empty variable" default assignment, which is mostly
${name}_flags="", but fix a few others as well.
2. Where they are not already documented, add the existence of the _flags
(or other deleted empties) option to the comments, and in some cases add
comments from scratch.
3. Replace things that look like:
prefix=%%PREFIX%%
command=${prefix}/sbin/foo
to just use %%PREFIX%%. In many cases the $prefix variable is only used
once, and in some cases it is not used at all.
4. In a few cases remove ${name}_flags from command_args
5. Remove a long-stale comment about putting the port's rc.d script in
/etc/rc.d (which is no longer necessary).
No PORTREVISION bumps because all of these changes are noops.
- Update pgbouncer to 1.2.3
- Add new UID and GID for pgbouncer
- Improve handling of example configuration files
- Add support for the reload rc command
- Other minor enhancements
PR: ports/126454
Submitted by: mm
Approved by: skv (maintainer)