On 10/31 07:57, Pierre-Emmanuel Andr? wrote:
> On Mon, Oct 31, 2016 at 09:53:24AM -0700, Jeremy Evans wrote:
> > This updates pea@'s earlier diff that targeted 9.6.0 to work with
> > 9.6.1, and modifies it to separate pg_upgrade into a separate
> > subpackage. The pg_upgrade subpackage depends on a new port
> > containing the previous PostgreSQL major version.
> >
> > The new port is databases/postgresql-previous, and it installs
> > into /usr/local/{bin,include,lib,share}/postgresql-9.5 directories.
> > We could obviously use subdirectories in databases/postgresql, but
> > that creates more ports churn. I didn't use subpackages for
> > postgresql-previous, merging the client/server/contrib packages
> > and dropping the docs and plpython packages. I also dropped the
> > rc script and README. I suppose we could add back the rc script
> > if there are users that really want to run the previous version
> > in production and not just use it for pg_upgrade.
> >
> > This updates the postgresql-server README to mention the use of
> > pg_upgrade as a possible upgrade option. Basically, instead of
> > dumping before upgrade and reloading after, you do:
> >
> > pg_upgrade -b /usr/local/bin/postgresql-9.5/ \
> > -B /usr/local/bin -U postgres \
> > -d /var/postgresql/data.old/ -D /var/postgresql/data
> >
> > after stopping the old server and before starting the new server.
> >
> > Briefly tested with a small (~400MB) database on amd64, no problems
> > noticed.
> >
> > Before this can be committed, we need to test everything that depends
> > on PostgreSQL and make sure it still works with 9.6.1, or have working
> > diffs that can be committed shortly after the upgrade to 9.6.1. I hope
> > to start that work shortly.
> >
> > Thoughts?
> >
>
> Hi,
>
> Thanks for your diff. I will look at it asap.
> For PostgreSQL 9.6, ajacoutot@ ran a bulk and it breaks:
> databases/postgresql-plv8, databases/pg_statsinfo, databases/skytools,
> databases/postgresql-pllua
Here's a diff that allows all 4 to build. No run time tests yet.
Thanks,
Jeremy
Index: postgresql-plv8/Makefile
===================================================================
RCS file: /cvs/ports/databases/postgresql-plv8/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- postgresql-plv8/Makefile 1 Jul 2016 11:38:35 -0000 1.8
+++ postgresql-plv8/Makefile 1 Nov 2016 11:21:36 -0000
@@ -6,7 +6,7 @@ ONLY_FOR_ARCHS = amd64 i386
COMMENT = PostgreSQL V8 javascript procedual language
VERSION = 1.4.2
-REVISION = 2
+REVISION = 3
DISTNAME = plv8-${VERSION}
PKGNAME = postgresql-${DISTNAME}
@@ -24,7 +24,7 @@ EXTRACT_SUFX = .zip
BUILD_DEPENDS = ${RUN_DEPENDS}
LIB_DEPENDS = lang/libv8
-RUN_DEPENDS =
postgresql-server->=9.5,<9.6:databases/postgresql,-server
+RUN_DEPENDS =
postgresql-server->=9.6,<9.7:databases/postgresql,-server
MAKE_FLAGS = V8DIR=${LOCALBASE}/lib \
CUSTOM_CC="${CXX}" \
Index: postgresql-pllua/Makefile
===================================================================
RCS file: /cvs/ports/databases/postgresql-pllua/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- postgresql-pllua/Makefile 13 May 2016 14:36:37 -0000 1.7
+++ postgresql-pllua/Makefile 1 Nov 2016 11:20:39 -0000
@@ -5,7 +5,7 @@ COMMENT = Lua procedural language suppo
VERSION = 1.0
DISTNAME = pllua-${VERSION}
PKGNAME = postgresql-pllua-${VERSION}
-REVISION = 1
+REVISION = 2
CATEGORIES = databases
@@ -22,7 +22,7 @@ MASTER_SITES = http://pgfoundry.org/frs
MODULES = lang/lua
BUILD_DEPENDS = ${RUN_DEPENDS}
-RUN_DEPENDS =
postgresql-server->=9.5,<9.6:databases/postgresql,-server
+RUN_DEPENDS =
postgresql-server->=9.6,<9.7:databases/postgresql,-server
USE_GMAKE = Yes
Index: pg_statsinfo/Makefile
===================================================================
RCS file: /cvs/ports/databases/pg_statsinfo/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- pg_statsinfo/Makefile 11 Sep 2016 20:54:12 -0000 1.8
+++ pg_statsinfo/Makefile 1 Nov 2016 11:52:48 -0000
@@ -4,7 +4,7 @@ COMMENT = monitor PostgreSQL activity &
DISTNAME = pg_statsinfo-3.2.1
CATEGORIES = databases
-REVISION = 0
+REVISION = 1
HOMEPAGE = http://pgstatsinfo.sourceforge.net/
Index: pg_statsinfo/patches/patch-agent_lib_libstatsinfo_c
===================================================================
RCS file:
/cvs/ports/databases/pg_statsinfo/patches/patch-agent_lib_libstatsinfo_c,v
retrieving revision 1.3
diff -u -p -r1.3 patch-agent_lib_libstatsinfo_c
--- pg_statsinfo/patches/patch-agent_lib_libstatsinfo_c 13 May 2016 22:09:21
-0000 1.3
+++ pg_statsinfo/patches/patch-agent_lib_libstatsinfo_c 1 Nov 2016 11:48:12
-0000
@@ -1,7 +1,24 @@
$OpenBSD: patch-agent_lib_libstatsinfo_c,v 1.3 2016/05/13 22:09:21 landry Exp $
---- agent/lib/libstatsinfo.c.orig Fri Feb 12 10:49:13 2016
-+++ agent/lib/libstatsinfo.c Fri May 13 23:34:34 2016
-@@ -1693,9 +1693,11 @@ statsinfo_restart(PG_FUNCTION_ARGS)
+--- agent/lib/libstatsinfo.c.orig Fri Feb 12 01:49:13 2016
++++ agent/lib/libstatsinfo.c Tue Nov 1 04:48:05 2016
+@@ -476,6 +476,7 @@ sample_activity(void)
+ int waiting;
+ int running;
+ int i;
++ volatile PGPROC *proc = MyProc;
+
+ if (!long_xacts)
+ {
+@@ -515,7 +516,7 @@ sample_activity(void)
+ */
+ if (be->st_procpid == MyProcPid)
+ ; /* exclude myself */
+- else if (be->st_waiting)
++ else if (proc->wait_event_info)
+ waiting++;
+ #if PG_VERSION_NUM >= 90200
+ else if (be->st_state == STATE_IDLE)
+@@ -1693,9 +1694,11 @@ statsinfo_restart(PG_FUNCTION_ARGS)
#define NUM_STAT_FIELDS_MIN 6
/* not support a kernel that does not have the required fields at
"/proc/stat" */
@@ -13,7 +30,7 @@ $OpenBSD: patch-agent_lib_libstatsinfo_c
/*
* statsinfo_cpustats - get cpu information
-@@ -1734,6 +1736,7 @@ statsinfo_cpustats_noarg(PG_FUNCTION_ARGS)
+@@ -1734,6 +1737,7 @@ statsinfo_cpustats_noarg(PG_FUNCTION_ARGS)
PG_RETURN_DATUM(get_cpustats(fcinfo, 0, 0, 0, 0));
}
@@ -21,7 +38,7 @@ $OpenBSD: patch-agent_lib_libstatsinfo_c
static Datum
get_cpustats(FunctionCallInfo fcinfo,
int64 prev_cpu_user,
-@@ -1746,6 +1749,59 @@ get_cpustats(FunctionCallInfo fcinfo,
+@@ -1746,6 +1750,59 @@ get_cpustats(FunctionCallInfo fcinfo,
int64 cpu_system;
int64 cpu_idle;
int64 cpu_iowait;
@@ -81,7 +98,7 @@ $OpenBSD: patch-agent_lib_libstatsinfo_c
List *records = NIL;
List *fields = NIL;
HeapTuple tuple;
-@@ -1818,6 +1874,7 @@ get_cpustats(FunctionCallInfo fcinfo,
+@@ -1818,6 +1875,7 @@ get_cpustats(FunctionCallInfo fcinfo,
return HeapTupleGetDatum(tuple);
}
@@ -89,7 +106,7 @@ $OpenBSD: patch-agent_lib_libstatsinfo_c
#define NUM_DEVICESTATS_COLS 17
#define TYPE_DEVICE_TABLESPACES TEXTOID
-@@ -1991,10 +2048,46 @@ statsinfo_devicestats(PG_FUNCTION_ARGS)
+@@ -1991,10 +2049,46 @@ statsinfo_devicestats(PG_FUNCTION_ARGS)
/*
* statsinfo_loadavg - get loadavg information
*/
@@ -136,7 +153,7 @@ $OpenBSD: patch-agent_lib_libstatsinfo_c
int fd;
char buffer[256];
int nbytes;
-@@ -2053,6 +2146,7 @@ statsinfo_loadavg(PG_FUNCTION_ARGS)
+@@ -2053,6 +2147,7 @@ statsinfo_loadavg(PG_FUNCTION_ARGS)
return HeapTupleGetDatum(tuple);
}
@@ -144,7 +161,7 @@ $OpenBSD: patch-agent_lib_libstatsinfo_c
#define FILE_MEMINFO "/proc/meminfo"
#define NUM_MEMORY_COLS 5
-@@ -2072,6 +2166,7 @@ compare_meminfo_table(const void *a, const void *b)
+@@ -2072,6 +2167,7 @@ compare_meminfo_table(const void *a, const void *b)
/*
* statsinfo_memory - get memory information
*/
@@ -152,7 +169,7 @@ $OpenBSD: patch-agent_lib_libstatsinfo_c
Datum
statsinfo_memory(PG_FUNCTION_ARGS)
{
-@@ -2079,6 +2174,36 @@ statsinfo_memory(PG_FUNCTION_ARGS)
+@@ -2079,6 +2175,36 @@ statsinfo_memory(PG_FUNCTION_ARGS)
HeapTuple tuple;
Datum values[NUM_MEMORY_COLS];
bool nulls[NUM_MEMORY_COLS];
@@ -189,7 +206,7 @@ $OpenBSD: patch-agent_lib_libstatsinfo_c
int fd;
char buffer[2048];
int nbytes;
-@@ -2177,6 +2302,7 @@ nextline:
+@@ -2177,6 +2303,7 @@ nextline:
return HeapTupleGetDatum(tuple);
}
@@ -197,7 +214,7 @@ $OpenBSD: patch-agent_lib_libstatsinfo_c
#define FILE_PROFILE "/proc/systemtap/statsinfo_prof/profile"
#define NUM_PROFILE_COLS 3
-@@ -2185,9 +2311,16 @@ nextline:
+@@ -2185,9 +2312,16 @@ nextline:
/*
* statsinfo_profile - get profile information
*/
@@ -214,7 +231,7 @@ $OpenBSD: patch-agent_lib_libstatsinfo_c
ReturnSetInfo *rsinfo = (ReturnSetInfo *) fcinfo->resultinfo;
TupleDesc tupdesc;
Tuplestorestate *tupstore;
-@@ -2294,6 +2427,7 @@ statsinfo_profile(PG_FUNCTION_ARGS)
+@@ -2294,6 +2428,7 @@ statsinfo_profile(PG_FUNCTION_ARGS)
PG_RETURN_VOID();
}
Index: skytools/Makefile
===================================================================
RCS file: /cvs/ports/databases/skytools/Makefile,v
retrieving revision 1.23
diff -u -p -r1.23 Makefile
--- skytools/Makefile 25 Aug 2015 12:57:33 -0000 1.23
+++ skytools/Makefile 1 Nov 2016 11:29:51 -0000
@@ -4,7 +4,7 @@ COMMENT= PostgreSQL tools from Skype
MODPY_EGG_VERSION= 3.1.1
DISTNAME= skytools-${MODPY_EGG_VERSION}
-REVISION= 1
+REVISION= 2
CATEGORIES= databases
Index: skytools/patches/patch-sql_pgq_triggers_stringutil_c
===================================================================
RCS file: skytools/patches/patch-sql_pgq_triggers_stringutil_c
diff -N skytools/patches/patch-sql_pgq_triggers_stringutil_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ skytools/patches/patch-sql_pgq_triggers_stringutil_c 1 Nov 2016
11:30:38 -0000
@@ -0,0 +1,19 @@
+$OpenBSD$
+
+Fix build on PostgreSQL 9.6, patch taken from
+https://github.com/markokr/skytools/pull/56
+
+--- sql/pgq/triggers/stringutil.c.orig Tue Nov 1 04:28:50 2016
++++ sql/pgq/triggers/stringutil.c Tue Nov 1 04:28:53 2016
+@@ -19,7 +19,11 @@
+ #include <postgres.h>
+ #include <lib/stringinfo.h>
+ #include <mb/pg_wchar.h>
++#if PG_VERSION_NUM >= 90600
++#include <common/keywords.h>
++#else
+ #include <parser/keywords.h>
++#endif
+ #include <utils/memutils.h>
+
+ #include "stringutil.h"