rebase to most recent upstream version

Per release notes:
http://www.pgpool.net/docs/pgpool-II-3.3.3/NEWS.txt

Resolves: #1094713
Version: 3.3.3-1
This commit is contained in:
Jozef Mlích 2014-06-12 15:19:09 +02:00 committed by Pavel Raiskup
commit 0b9e6146d4
5 changed files with 30 additions and 62 deletions

3
.gitignore vendored
View file

@ -1,2 +1 @@
/pgpool-II-3.1.3.tar.gz
/pgpool-II-3.2.0.tar.gz
/pgpool-II-3.3.3.tar.gz

View file

@ -1,47 +0,0 @@
commit 2e9a136413473e799cf9ee3cd30a9ae40cf8e7c1
Author: Tatsuo Ishii <ishii@postgresql.org>
AuthorDate: Wed Apr 3 16:20:15 2013 +0900
Commit: Tatsuo Ishii <ishii@postgresql.org>
CommitDate: Wed Apr 3 16:20:15 2013 +0900
Adopt PostgreSQL 9.3. Patch contributed by Asif Rehman.
Slight editing by Tatsuo Ishii.
diff --git a/sql/pgpool-recovery/pgpool-recovery.c b/sql/pgpool-recovery/pgpool-recovery.c
index 8408e3f..4f47e2c 100644
--- a/sql/pgpool-recovery/pgpool-recovery.c
+++ b/sql/pgpool-recovery/pgpool-recovery.c
@@ -4,7 +4,7 @@
*
* pgpool-recovery: exec online recovery script from SELECT statement.
*
- * Copyright (c) 2003-2010 PgPool Global Development Group
+ * Copyright (c) 2003-2013 PgPool Global Development Group
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
@@ -29,6 +29,9 @@
#include "catalog/namespace.h"
#include "utils/syscache.h"
#include "utils/builtins.h" /* PostgreSQL 8.4 needs this for textout */
+#if defined(PG_VERSION_NUM) && (PG_VERSION_NUM >= 90300)
+#include "access/htup_details.h" /* PostgreSQL 9.3 or later needs this */
+#endif
#define REMOTE_START_FILE "pgpool_remote_start"
@@ -198,7 +201,14 @@ get_function_oid(const char *funcname, const char *argtype, const char *nspname)
oid_v = buildoidvector(NULL, 0);
}
+#if !defined(PG_VERSION_NUM) || (PG_VERSION_NUM < 90300)
nspid = LookupExplicitNamespace(nspname);
+#else
+ /* LookupExplicitNamespace() of PostgreSQL 9.3 or later, has third
+ * argument "missing_ok" which suppresses ERROR exception, but
+ * returns invlaid_oid. See include/catalog/namespace.h */
+ nspid = LookupExplicitNamespace(nspname, false);
+#endif
elog(DEBUG1, "get_function_oid: oid of \"%s\": %d", nspname, nspid);
tup = SearchSysCache(PROCNAMEARGSNSP,

View file

@ -7,8 +7,8 @@
Summary: Pgpool is a connection pooling/replication server for PostgreSQL
Name: postgresql-%{short_name}
Version: 3.2.0
Release: 4%{?dist}
Version: 3.3.3
Release: 1%{?dist}
License: BSD
Group: Applications/Databases
URL: http://pgpool.net
@ -16,13 +16,13 @@ Source0: http://www.pgpool.net/download.php?f=%{short_name}-%{version}.tar.gz
Source1: pgpool.service
Source2: pgpool.sysconfig
Source3: pgpool.init
Source4: postgresql-pgpool-II.tmpfiles.d
Patch1: pgpool-3.1-conf.sample.patch
# Apply #ifdef-like patch to allow build against PostgreSQL 9.3
# ~> upstream (2e9a136413473e799cf)
Patch2: pgpool-3.2-build-against-postgresql-9.3.patch
BuildRequires: postgresql-devel pam-devel
%if %{systemd_enabled}
BuildRequires: systemd
# We require this to be present for %%{_prefix}/lib/tmpfiles.d
Requires: systemd-units
Requires(post): systemd-sysv
Requires(post): systemd
Requires(preun): systemd
@ -73,7 +73,6 @@ PGPool recovery add-on for PostgreSQL.
%prep
%setup -q -n %{short_name}-%{version}
%patch1 -p1 -b .samplefix
%patch2 -p1 -b .build-for-postgresql-9.3
%build
%configure --with-pgsql-includedir=%{_includedir}/pgsql --with-pgsql=%{_libdir}/pgsql --disable-static --with-pam --disable-rpath --sysconfdir=%{_sysconfdir}/%{short_name}/
@ -96,6 +95,11 @@ mv %{buildroot}/%{_sysconfdir}/%{short_name}/pgpool.conf.sample-stream %{buildro
%if %{systemd_enabled}
install -d %{buildroot}%{_unitdir}
install -m 755 %{SOURCE1} %{buildroot}%{_unitdir}/pgpool.service
# ... and make a tmpfiles script to recreate it at reboot.
mkdir -p $RPM_BUILD_ROOT%{_tmpfilesdir}
install -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_tmpfilesdir}/postgresql-pgpool-II.conf
%else
install -d %{buildroot}%{_sysconfdir}/init.d
install -m 755 %{SOURCE3} %{buildroot}%{_sysconfdir}/init.d/pgpool
@ -162,6 +166,7 @@ fi
%{_bindir}/pcp_recovery_node
%{_bindir}/pcp_stop_pgpool
%{_bindir}/pcp_systemdb_info
%{_bindir}/pcp_watchdog_info
%{_bindir}/pg_md5
%{_mandir}/man8/pgpool*
%dir %{_datadir}/%{short_name}
@ -173,6 +178,8 @@ fi
%{_libdir}/libpcp.so.*
%{_datadir}/%{short_name}/pgpool.pam
%if %{systemd_enabled}
%{_tmpfilesdir}/postgresql-pgpool-II.conf
%{_unitdir}/pgpool.service
%else
%{_sysconfdir}/init.d/pgpool
@ -189,11 +196,19 @@ fi
%files recovery
%{_libdir}/pgsql/pgpool-recovery.so
%{_datadir}/pgsql/contrib/pgpool-recovery.sql
%{_datadir}/pgsql/contrib/uninstall_pgpool-recovery.sql
%{_datadir}/pgsql/extension/pgpool-recovery.sql
%{_datadir}/pgsql/extension/pgpool_recovery--1.0.sql
%{_datadir}/pgsql/extension/pgpool_recovery.control
%doc sample/pgpool_recovery*
%changelog
* Thu Jun 05 2014 Jozef Mlich <jmlich@redhat.com> - 3.3.3-1
- adding tmpfiles.d (allow pid file to be created in /var/run/pgpool - dir
created after reboot)
- Rebase to pgpool-II 3.3.3 (#1094713)
* Thu Sep 19 2013 Pavel Raiskup <praiskup@redhat.com> - 3.2.0-4
- Rebuilt against PostgreSQL 9.3 (#1007855)
@ -332,12 +347,12 @@ fuzz = 0 policy in rawhide
- added --disable-rpath configure parameter.
- Chowned sample conf files, so that they can work with pgpoolAdmin.
* Thu Apr 22 2007 Devrim Gunduz <devrim@CommandPrompt.com> 1.0.2-4
* Sun Apr 22 2007 Devrim Gunduz <devrim@CommandPrompt.com> 1.0.2-4
- Added postgresql-devel as BR, per bugzilla review.
- Added --disable-static flan, per bugzilla review.
- Removed superfluous manual file installs, per bugzilla review.
* Thu Apr 22 2007 Devrim Gunduz <devrim@CommandPrompt.com> 1.0.2-3
* Sun Apr 22 2007 Devrim Gunduz <devrim@CommandPrompt.com> 1.0.2-3
- Rebuilt for the correct tarball
- Fixed man8 file ownership, per bugzilla review #229321
@ -361,10 +376,10 @@ fuzz = 0 policy in rawhide
- Fix .so link problem
- Cosmetic changes to spec file
* Thu Sep 27 2006 - Devrim GUNDUZ <devrim@commandprompt.com> 1.0.1-3
* Wed Sep 27 2006 - Devrim GUNDUZ <devrim@commandprompt.com> 1.0.1-3
- Fix spec, per Yoshiyuki Asaba
* Thu Sep 26 2006 - Devrim GUNDUZ <devrim@commandprompt.com> 1.0.1-2
* Tue Sep 26 2006 - Devrim GUNDUZ <devrim@commandprompt.com> 1.0.1-2
- Fixed rpmlint errors
- Fixed download url
- Added ldconfig for .so files

View file

@ -0,0 +1 @@
d /var/run/pgpool 0755 root root -

View file

@ -1 +1 @@
b3194d7ff15c2c74a803a323c4afd22b pgpool-II-3.2.0.tar.gz
ceeb477b978db481c0638f5242c9240d pgpool-II-3.3.3.tar.gz