pgpool-II is a middleware that sits between PostgreSQL servers and a

PostgreSQL database client. It provides the following features:

+ Connection Pooling
+ Replication
+ Load Balance
+ Limiting Exceeding Connections
+ Parallel Query

with tweaks from ajacoutot@, thanks.

ok ajacoutot@
This commit is contained in:
pea 2011-12-21 15:51:04 +00:00
parent 6eb752069d
commit 17bbcb18de
7 changed files with 135 additions and 0 deletions

42
databases/pgpool/Makefile Normal file
View File

@ -0,0 +1,42 @@
# $OpenBSD: Makefile,v 1.1.1.1 2011/12/21 15:51:04 pea Exp $
COMMENT= connection pool server for PostgreSQL
DISTNAME= pgpool-II-3.1
CATEGORIES= databases
HOMEPAGE= http://www.pgpool.net/
MAINTAINER= Pierre-Emmanuel Andre <pea@openbsd.org>
SHARED_LIBS= pcp 0.0
# BSD
PERMIT_PACKAGE_FTP= Yes
PERMIT_PACKAGE_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
MASTER_SITES= http://pgfoundry.org/frs/download.php/3114/
WANTLIB= c crypto m pq ssl
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS= --with-openssl
USE_GMAKE= Yes
FAKE_FLAGS= sysconfdir=${PREFIX}/share/examples/pgpool-II/
BUILD_DEPENDS = databases/postgresql,-server
LIB_DEPENDS = databases/postgresql
post-install:
@cd ${WRKSRC}/sql/pgpool-regclass && \
env -i ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} \
-f ${MAKE_FILE} ${ALL_TARGET} && \
env -i ${MAKE_ENV} \
PREFIX=${WRKINST}${PREFIX} ${DESTDIRNAME}=${WRKINST} TRUEPREFIX=${PREFIX} \
${MAKE_PROGRAM} ${ALL_FAKE_FLAGS} -f ${MAKE_FILE} ${FAKE_TARGET}
.include <bsd.port.mk>

View File

@ -0,0 +1,5 @@
MD5 (pgpool-II-3.1.tar.gz) = 27WRqKo8O9HmifQadji57g==
RMD160 (pgpool-II-3.1.tar.gz) = 1MV3TLmM4JZy7QFLcmn0qKgDteU=
SHA1 (pgpool-II-3.1.tar.gz) = amyXLFsBMTv2cG4+vw2wLyUPmJA=
SHA256 (pgpool-II-3.1.tar.gz) = dCEUzqnSur8cMw3VBQ7NI9mpvlPr48vYcUJ2LoqOqUA=
SIZE (pgpool-II-3.1.tar.gz) = 1354418

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-pool_lobj_c,v 1.1.1.1 2011/12/21 15:51:04 pea Exp $
--- pool_lobj.c.orig Thu Nov 24 15:43:49 2011
+++ pool_lobj.c Thu Nov 24 15:44:02 2011
@@ -27,6 +27,7 @@
#include <unistd.h>
#include <string.h>
#include <netinet/in.h>
+#include <stdint.h>
#include "pool.h"
#include "pool_lobj.h"

View File

@ -0,0 +1,8 @@
pgpool-II is a middleware that sits between PostgreSQL servers and a
PostgreSQL database client. It provides the following features:
+ Connection Pooling
+ Replication
+ Load Balance
+ Limiting Exceeding Connections
+ Parallel Query

View File

@ -0,0 +1,3 @@
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2011/12/21 15:51:04 pea Exp $
@lib lib/libpcp.so.${LIBpcp_VERSION}
lib/postgresql/pgpool-regclass.so

View File

@ -0,0 +1,44 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2011/12/21 15:51:04 pea Exp $
@newgroup _pgpool:690
@newuser _pgpool:690:_pgpool:daemon:pgpool daemon:/nonexistent:/sbin/nologin
%%SHARED%%
@bin bin/pcp_attach_node
@bin bin/pcp_detach_node
@bin bin/pcp_node_count
@bin bin/pcp_node_info
@bin bin/pcp_pool_status
@bin bin/pcp_proc_count
@bin bin/pcp_proc_info
@bin bin/pcp_promote_node
@bin bin/pcp_recovery_node
@bin bin/pcp_stop_pgpool
@bin bin/pcp_systemdb_info
@bin bin/pg_md5
@bin bin/pgpool
include/libpcp_ext.h
include/pcp.h
include/pool_process_reporting.h
include/pool_type.h
lib/libpcp.a
lib/libpcp.la
lib/postgresql/
@man man/man8/pgpool.8
share/examples/pgpool-II/
share/examples/pgpool-II/pcp.conf.sample
@sample ${SYSCONFDIR}/pcp.conf
share/examples/pgpool-II/pgpool.conf.sample
@sample ${SYSCONFDIR}/pgpool.conf
share/examples/pgpool-II/pgpool.conf.sample-master-slave
share/examples/pgpool-II/pgpool.conf.sample-replication
share/examples/pgpool-II/pgpool.conf.sample-stream
share/examples/pgpool-II/pool_hba.conf.sample
@sample ${SYSCONFDIR}/pool_hba.conf
share/pgpool-II/
share/pgpool-II/insert_lock.sql
share/pgpool-II/pgpool.pam
share/pgpool-II/system_db.sql
share/postgresql/
share/postgresql/contrib/
share/postgresql/contrib/pgpool-regclass.sql
share/postgresql/contrib/uninstall_pgpool-regclass.sql
@rcscript ${RCDIR}/pgpool

View File

@ -0,0 +1,22 @@
#!/bin/sh
#
# $OpenBSD: pgpool.rc,v 1.1.1.1 2011/12/21 15:51:04 pea Exp $
daemon="${TRUEPREFIX}/bin/pgpool"
daemon_user="_pgpool"
. /etc/rc.d/rc.subr
rc_pre() {
/usr/bin/install -d -o _pgpool /var/run/pgpool
}
rc_stop() {
${daemon} -m s stop || ${daemon} -m f stop
}
rc_reload() {
${daemon} reload
}
rc_cmd $1