Skip to content

Commit

Permalink
Update databases/pgbouncer to 1.7.2.
Browse files Browse the repository at this point in the history
Set up a separate user, previous PGUSER/PGGROUP integration didn't
make sense.

2016-02-26 - PgBouncer 1.7.2 - "Finally Airborne"

- Fix crash on stale pidfile removal. Problem introduced in 1.7.1.
- Disable cleanup - it breaks takeover and is not useful for
  production loads. Problem introduced in 1.7.1.
- After takeover, wait until pidfile is gone before booting. Slow
  shutdown due to memory cleanup exposed existing race. (#113)
- Make build reproducible by dropping DBGVER handling. (#112)
- Antimake: Sort file list from $(wildcard), newer gmake does not
  sort it anymore. (#111)
- Show libssl version in log.
- deb: Turn on full hardening.

2016-02-18 - PgBouncer 1.7.1 - "Forward To Five Friends Or Else"

- WARNING: Since version 1.7, server_reset_query is not executed
  when database is in transaction-pooling mode. Seems this was not
  highlighted enough in 1.7 announcement. If your apps depend on
  that happening, use server_reset_query_always to restore previous
  behaviour.
- TLS: Rename sslmode "disabled" to "disable" as that is what
  PostgreSQL uses.
- TLS: client_tls_sslmode=verify-ca/-full now reject connections
  without client certificate. (#104)
- TLS: client_tls_sslmode=allow/require do validate client
  certificate if sent. Previously they left cert validation
  unconfigured so connections with client cert failed. (#105)
- Fix memleak when freeing database.
- Fix potential memleak in tls_handshake().
- Fix EOF handling in tls_handshake().
- Fix too small memset in asn1_time_parse compat.
- Fix non-TLS (--without-openssl) build. (#101)
- Fix various issues with Windows build. (#100)
- TLS: Use SSL_MODE_RELEASE_BUFFERS to decrease memory usage of
  inactive connections.
- Clean allocated memory on exit. Helps to run memory-leak
  checkers.
- Improve server_reset_query documentation. (#110)
- Add TLS options to sample config.

2015-12-18 - PgBouncer 1.7 - "Colors Vary After Resurrection"
- Support TLS connections. OpenSSL/LibreSSL is used as backend
  implementation.
- Support authentication via TLS client certificate.
- Support "peer" authentication on Unix sockets.
- Support Host Based Access control file, like pg_hba.conf in
  Postgres. This allows to configure TLS for network connections
  and "peer" authentication for local connections.
- Set query_wait_timeout to 120s by default. Current default (0)
  causes infinite queueing, which is not useful. That means if
  client has pending query and has not been assigned to server
  connection, the client connection will be dropped.
- Disable server_reset_query_always by default. Now reset query is
  used only in pools that are in session mode.
- Increase pkt_buf to 4096 bytes. Improves performance with TLS.
  The behaviour is probably load-specific, but it should be safe
  to do as since v1.2 the packet buffers are split from connections
  and used lazily from pool.
- Support pipelining count expected ReadyForQuery packets. This
  avoids releasing server too early. Fixes #52.
- Improved sbuf_loopcnt logic - socket is guarateed to be
  reprocessed even if there are no event from socket. Required for
  TLS as it has it's own buffering.
- Adapt system tests to work with modern BSD and MacOS. (Eric
  Radman)
- Remove crypt auth. It's obsolete and not supported by PostgreSQL
  since 8.4.
- Fix plain "--with-cares" configure option - without argument it
  was broken.
  • Loading branch information
fhajny committed Mar 15, 2016
1 parent c744f8b commit 985fc76
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 35 deletions.
31 changes: 15 additions & 16 deletions databases/pgbouncer/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# $NetBSD: Makefile,v 1.10 2016/03/05 11:28:13 jperkin Exp $
# $NetBSD: Makefile,v 1.11 2016/03/15 11:29:35 fhajny Exp $
#

DISTNAME= pgbouncer-1.6.1
PKGREVISION= 1
DISTNAME= pgbouncer-1.7.2
CATEGORIES= databases
MASTER_SITES= http://pgbouncer.github.io/downloads/files/${PKGVERSION_NOREV}/

Expand All @@ -17,22 +16,21 @@ GNU_CONFIGURE= yes

.include "../../mk/bsd.prefs.mk"

PGUSER?= pgsql
PGGROUP?= pgsql
PKG_GROUPS= ${PGGROUP}
PKG_USERS= ${PGUSER}:${PGGROUP}
PKG_GECOS.${PGUSER}= PostgreSQL database administrator
PKG_HOME.${PGUSER}= ${PGHOME}

BUILD_DEFS+= PGUSER PGGROUP PGHOME VARBASE
FILES_SUBST+= PGUSER=${PGUSER}
FILES_SUBST+= PGGROUP=${PGGROUP}
FILES_SUBST+= PGHOME=${PGHOME}

PGB_USER?= pgbounce
PGB_GROUP?= pgbounce
PGB_LOG_DIR?= ${VARBASE}/log/pgbouncer
PGB_RUN_DIR?= ${VARBASE}/run

OWN_DIRS_PERMS+= ${PGB_LOG_DIR} ${PGUSER} ${PGGROUP} 0755
PKG_GROUPS= ${PGB_GROUP}
PKG_USERS= ${PGB_USER}:${PGB_GROUP}
PKG_GECOS.${PGB_USER}= PgBouncer daemon user
PKG_HOME.${PGB_USER}= ${PGB_LOG_DIR}

BUILD_DEFS+= PGB_USER PGB_GROUP VARBASE
FILES_SUBST+= PGB_USER=${PGB_USER}
FILES_SUBST+= PGB_GROUP=${PGB_GROUP}

OWN_DIRS_PERMS+= ${PGB_LOG_DIR} ${PGB_USER} ${PGB_GROUP} 0755

EGDIR= ${PREFIX}/share/examples/${PKGBASE}
CONF_FILES= ${EGDIR}/pgbouncer.ini ${PKG_SYSCONFDIR}/pgbouncer.ini \
Expand Down Expand Up @@ -65,4 +63,5 @@ INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 ${PKGMANDIR}/man5 ${EGDIR}
BUILDLINK_API_DEPENDS.libevent+= libevent>=2.0
.include "../../devel/libevent/buildlink3.mk"
.include "../../net/libcares/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
6 changes: 3 additions & 3 deletions databases/pgbouncer/PLIST
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@comment $NetBSD: PLIST,v 1.3 2015/10/23 16:40:38 fhajny Exp $
@comment $NetBSD: PLIST,v 1.4 2016/03/15 11:29:35 fhajny Exp $
bin/pgbouncer
man/man1/pgbouncer.1
man/man5/pgbouncer.5
share/doc/pgbouncer/NEWS
share/doc/pgbouncer/README
share/doc/pgbouncer/NEWS.rst
share/doc/pgbouncer/README.rst
share/examples/pgbouncer/pgbouncer.ini
share/examples/pgbouncer/userlist.txt
12 changes: 6 additions & 6 deletions databases/pgbouncer/distinfo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$NetBSD: distinfo,v 1.6 2015/11/04 17:41:15 agc Exp $
$NetBSD: distinfo,v 1.7 2016/03/15 11:29:35 fhajny Exp $

SHA1 (pgbouncer-1.6.1.tar.gz) = 4abeee4965a26197e2c193d6bfb01eef46aa72a8
RMD160 (pgbouncer-1.6.1.tar.gz) = 3eb6d6aae0f634c71bf28eae5f5aa471c4016a9d
SHA512 (pgbouncer-1.6.1.tar.gz) = cf1cd28b04531bce879f3f9f50b54754253e0d9882c7f122c99d1c0c39fb01264c1ba20f5fd7b42ce7f5356f413b05caf48bbb633693d866271e129426923529
Size (pgbouncer-1.6.1.tar.gz) = 431076 bytes
SHA1 (patch-Makefile) = 9c33efeb8c3c70487cdca056002928fc955a8307
SHA1 (pgbouncer-1.7.2.tar.gz) = d9bb29da15d90713e2399af3ebf5019da5cbe2d6
RMD160 (pgbouncer-1.7.2.tar.gz) = 1bed03336e62f64b1afc652e4b2ddc6478de51ab
SHA512 (pgbouncer-1.7.2.tar.gz) = 11c89606599f424b34f39a4b072ec6293fea0b14ee52ae4fbc44775e6d83771a22d194f4e8eabe410e0d6a70657508cf1a3b1012543d91873c36f644afb5675d
Size (pgbouncer-1.7.2.tar.gz) = 462374 bytes
SHA1 (patch-Makefile) = 1c76e84975111d9ce077e73fe888dfe466874e33
4 changes: 2 additions & 2 deletions databases/pgbouncer/files/pgbouncer.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! @RCD_SCRIPTS_SHELL@
#
# $NetBSD: pgbouncer.sh,v 1.2 2014/05/13 14:18:49 fhajny Exp $
# $NetBSD: pgbouncer.sh,v 1.3 2016/03/15 11:29:35 fhajny Exp $
#
# PROVIDE: pgbouncer
# REQUIRE: DAEMON
Expand All @@ -18,7 +18,7 @@ pgbouncer_conf="@PKG_SYSCONFDIR@/${name}.ini"
required_files="${pgbouncer_conf}"
command_args="-d ${pgbouncer_conf}"
extra_commands="reload"
pgsql_user="@PGUSER@"
pgsql_user="@PGB_USER@"
start_cmd="pgbouncer_start"

pidfile="@VARBASE@/run/${name}/${name}.pid"
Expand Down
4 changes: 2 additions & 2 deletions databases/pgbouncer/files/smf/manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
<service_fmri value="svc:/system/filesystem/local" />
</dependency>
<method_context working_directory="@PGHOME@">
<method_credential user="@PGUSER@" group="@PGGROUP@" />
<method_context>
<method_credential user="@PGB_USER@" group="@PGB_GROUP@" />
</method_context>
<exec_method type="method" name="start" exec="@PREFIX@/bin/pgbouncer -d %{config_file}" timeout_seconds="60" />
<exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
Expand Down
11 changes: 5 additions & 6 deletions databases/pgbouncer/patches/patch-Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
$NetBSD: patch-Makefile,v 1.1 2015/10/23 16:40:38 fhajny Exp $
$NetBSD: patch-Makefile,v 1.2 2016/03/15 11:29:35 fhajny Exp $

Install sample config files as... config files.

--- Makefile.orig 2015-09-03 14:46:31.000000000 +0000
--- Makefile.orig 2016-02-26 08:56:32.000000000 +0000
+++ Makefile
@@ -47,7 +47,8 @@ AM_FEATURES = libusual
pgbouncer_EMBED_LIBUSUAL = 1
@@ -50,6 +50,8 @@ pgbouncer_EMBED_LIBUSUAL = 1

# docs to install as-is
-dist_doc_DATA = README NEWS etc/pgbouncer.ini etc/userlist.txt
+dist_doc_DATA = README NEWS
dist_doc_DATA = README.rst NEWS.rst etc/pgbouncer.ini etc/userlist.txt
+dist_doc_DATA = README.rst NEWS.rst
+dist_sysconf_DATA = etc/pgbouncer.ini etc/userlist.txt

DISTCLEANFILES = config.mak config.status lib/usual/config.h config.log
Expand Down

0 comments on commit 985fc76

Please sign in to comment.