diff options
author | Wen Heping <wen@FreeBSD.org> | 2011-01-18 13:10:35 +0000 |
---|---|---|
committer | Wen Heping <wen@FreeBSD.org> | 2011-01-18 13:10:35 +0000 |
commit | c9198de004b740de18b1b9590b48f83bb150d204 (patch) | |
tree | 50e4a57c7d21296fe3d44c6bdef04971543dc11b /databases | |
parent | 6a30c925f4538d75fd49b39f54c242916a32e28f (diff) | |
download | ports-c9198de004b740de18b1b9590b48f83bb150d204.tar.gz ports-c9198de004b740de18b1b9590b48f83bb150d204.zip |
Notes
Diffstat (limited to 'databases')
-rw-r--r-- | databases/Makefile | 1 | ||||
-rw-r--r-- | databases/postgresql-repmgr/Makefile | 37 | ||||
-rw-r--r-- | databases/postgresql-repmgr/distinfo | 2 | ||||
-rw-r--r-- | databases/postgresql-repmgr/files/patch-repmgrd.c | 16 | ||||
-rw-r--r-- | databases/postgresql-repmgr/pkg-descr | 4 | ||||
-rw-r--r-- | databases/postgresql-repmgr/pkg-plist | 5 |
6 files changed, 65 insertions, 0 deletions
diff --git a/databases/Makefile b/databases/Makefile index b952ce2bc53f..f962b832573e 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -598,6 +598,7 @@ SUBDIR += postgresql-plruby SUBDIR += postgresql-pltcl SUBDIR += postgresql-relay + SUBDIR += postgresql-repmgr SUBDIR += postgresql-tcltk SUBDIR += postgresql73-client SUBDIR += postgresql73-server diff --git a/databases/postgresql-repmgr/Makefile b/databases/postgresql-repmgr/Makefile new file mode 100644 index 000000000000..4ae205cd2631 --- /dev/null +++ b/databases/postgresql-repmgr/Makefile @@ -0,0 +1,37 @@ +# New ports collection makefile for: repmgr +# Date created: January 15, 2011 +# Whom: alp@sfedu.ru +# $FreeBSD$ + +PORTNAME= postgresql-repmgr +PORTVERSION= 1.0.0 +CATEGORIES= databases +MASTER_SITES= http://projects.2ndquadrant.it/sites/default/files/ +DISTNAME= repmgr-${PORTVERSION} + +MAINTAINER= alp@sfedu.ru +COMMENT= PostgreSQL replication manager + +BUILD_DEPENDS+= postgresql-server>=9.0:${PORTSDIR}/databases/postgresql90-server +RUN_DEPENDS= ${BUILD_DEPNDS} \ + rsync:${PORTSDIR}/net/rsync + +USE_GMAKE= yes +MAKE_ENV= USE_PGXS=1 + +PORTDOCS= README.* + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/repmgr ${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/repmgrd ${PREFIX}/sbin +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README.rst ${DOCSDIR} +.endif +.if !defined(NOPORTDATA) + @${MKDIR} ${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/repmgr.conf ${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/repmgr.sql ${DATADIR} +.endif + +.include <bsd.port.mk> diff --git a/databases/postgresql-repmgr/distinfo b/databases/postgresql-repmgr/distinfo new file mode 100644 index 000000000000..bc5604deb821 --- /dev/null +++ b/databases/postgresql-repmgr/distinfo @@ -0,0 +1,2 @@ +SHA256 (repmgr-1.0.0.tar.gz) = b0345a9a32c3f3bab542c8d2ef72881f6f45b6c0d703f481998beb5755a1d79b +SIZE (repmgr-1.0.0.tar.gz) = 35940 diff --git a/databases/postgresql-repmgr/files/patch-repmgrd.c b/databases/postgresql-repmgr/files/patch-repmgrd.c new file mode 100644 index 000000000000..1c2ae8fb41f5 --- /dev/null +++ b/databases/postgresql-repmgr/files/patch-repmgrd.c @@ -0,0 +1,16 @@ +--- repmgrd.c 2010-12-06 05:09:48.000000000 +0300 ++++ repmgrd.c 2011-01-16 12:34:49.345998423 +0300 +@@ -173,7 +173,12 @@ + } + + /* close the connection to the database and cleanup */ +- CloseConnections(); ++ if (PQisBusy(primaryConn) == 1) ++ CancelQuery(); ++ if (myLocalConn != NULL) ++ PQfinish(myLocalConn); ++ if (primaryConn != NULL && myLocalMode != PRIMARY_MODE) ++ PQfinish(primaryConn); + + return 0; + } diff --git a/databases/postgresql-repmgr/pkg-descr b/databases/postgresql-repmgr/pkg-descr new file mode 100644 index 000000000000..a45d06d0f05f --- /dev/null +++ b/databases/postgresql-repmgr/pkg-descr @@ -0,0 +1,4 @@ +repmgr allows you to monitor and manage your replicated PostgreSQL +databases as a single cluster. + +WWW: http://projects.2ndquadrant.com/repmgr diff --git a/databases/postgresql-repmgr/pkg-plist b/databases/postgresql-repmgr/pkg-plist new file mode 100644 index 000000000000..ae5d187db059 --- /dev/null +++ b/databases/postgresql-repmgr/pkg-plist @@ -0,0 +1,5 @@ +bin/repmgr +sbin/repmgrd +%%PORTDATA%%%%DATADIR%%/repmgr.conf +%%PORTDATA%%%%DATADIR%%/repmgr.sql +%%PORTDATA%%@dirrm %%DATADIR%% |