Seems a good time to move pgsql to python 3. While there I fixed a
missing flag in pkg-readme and, on reflection (and following feedback
from other developers) there are some cases where pg_upgrade doesn't
work (especially involving extensions) so I have brought back the
@ask-update that I changed from "previous" to "previous - 1".
comments? ok?
Index: Makefile
===================================================================
RCS file: /cvs/ports/databases/postgresql/Makefile,v
retrieving revision 1.269
diff -u -p -r1.269 Makefile
--- Makefile 23 Feb 2021 19:39:12 -0000 1.269
+++ Makefile 24 Feb 2021 17:45:35 -0000
@@ -9,6 +9,7 @@ COMMENT-pg_upgrade=Support for upgrading
VERSION= 13.2
PREV_MAJOR= 12
+REVISION= 0
DISTNAME= postgresql-${VERSION}
PKGNAME-main= postgresql-client-${VERSION}
PKGNAME-server= postgresql-server-${VERSION}
@@ -48,7 +49,6 @@ USE_GMAKE= Yes
CONFIGURE_STYLE=gnu
MODULES= lang/python
-MODPY_VERSION = ${MODPY_DEFAULT_VERSION_2}
MODPY_RUNDEP= No
CONFIGURE_ENV= ac_cv_path_PYTHON=${MODPY_BIN} \
Index: pkg/PLIST-plpython
===================================================================
RCS file: /cvs/ports/databases/postgresql/pkg/PLIST-plpython,v
retrieving revision 1.10
diff -u -p -r1.10 PLIST-plpython
--- pkg/PLIST-plpython 9 Feb 2021 20:01:37 -0000 1.10
+++ pkg/PLIST-plpython 24 Feb 2021 17:45:35 -0000
@@ -1,10 +1,10 @@
@comment $OpenBSD: PLIST-plpython,v 1.10 2021/02/09 20:01:37 sthen Exp $
include/postgresql/server/plpy_util.h
include/postgresql/server/plpython.h
-@so lib/postgresql/hstore_plpython2.so
-@so lib/postgresql/jsonb_plpython2.so
-@so lib/postgresql/ltree_plpython2.so
-@so lib/postgresql/plpython2.so
+@so lib/postgresql/hstore_plpython3.so
+@so lib/postgresql/jsonb_plpython3.so
+@so lib/postgresql/ltree_plpython3.so
+@so lib/postgresql/plpython3.so
share/postgresql/extension/hstore_plpython2u--1.0.sql
share/postgresql/extension/hstore_plpython2u.control
share/postgresql/extension/hstore_plpython3u--1.0.sql
@@ -23,7 +23,5 @@ share/postgresql/extension/ltree_plpytho
share/postgresql/extension/ltree_plpython3u.control
share/postgresql/extension/ltree_plpythonu--1.0.sql
share/postgresql/extension/ltree_plpythonu.control
-share/postgresql/extension/plpython2u--1.0.sql
-share/postgresql/extension/plpython2u.control
-share/postgresql/extension/plpythonu--1.0.sql
-share/postgresql/extension/plpythonu.control
+share/postgresql/extension/plpython3u--1.0.sql
+share/postgresql/extension/plpython3u.control
Index: pkg/PLIST-server
===================================================================
RCS file: /cvs/ports/databases/postgresql/pkg/PLIST-server,v
retrieving revision 1.41
diff -u -p -r1.41 PLIST-server
--- pkg/PLIST-server 9 Feb 2021 20:01:37 -0000 1.41
+++ pkg/PLIST-server 24 Feb 2021 17:45:35 -0000
@@ -4,9 +4,18 @@
@conflict postgresql-clients-*
@conflict postgresql-server-*
@conflict postgresql-*
-@ask-update postgresql-server-<${PREV_MAJOR} Old version too old for
pg_upgrade, make sure your database is backed up
+@ask-update postgresql-server-<${V_MAJOR} Updating across a major version -
data migration needed, see the pkg-readme
+@ask-update postgresql-server-<${PREV_MAJOR} CAUTION! Version before
${PREV_MAJOR} is too old for pg_upgrade. Make sure your database is backed up
@newgroup _postgresql:503
@newuser _postgresql:503:_postgresql:daemon:PostgreSQL
Manager:/var/postgresql:/bin/sh
+@rcscript ${RCDIR}/postgresql
+@mode 755
+@owner _postgresql
+@group _postgresql
+@sample /var/postgresql/
+@mode
+@owner
+@group
@bin bin/initdb
@bin bin/pg_basebackup
@bin bin/pg_checksums
@@ -950,8 +959,3 @@ share/postgresql/tsearch_data/thesaurus_
share/postgresql/tsearch_data/turkish.stop
share/postgresql/tsearch_data/unaccent.rules
share/postgresql/tsearch_data/xsyn_sample.rules
-@rcscript ${RCDIR}/postgresql
-@mode 755
-@owner _postgresql
-@group _postgresql
-@sample /var/postgresql/
Index: pkg/README-server
===================================================================
RCS file: /cvs/ports/databases/postgresql/pkg/README-server,v
retrieving revision 1.32
diff -u -p -r1.32 README-server
--- pkg/README-server 9 Feb 2021 20:01:37 -0000 1.32
+++ pkg/README-server 24 Feb 2021 17:45:35 -0000
@@ -168,7 +168,7 @@ faster than a dump and reload, especiall
(The database environment defaults to UTF-8 if your terminal is already
in a UTF-8 locale; if that is the case and you require an ASCII database
-environment, use "initdb --locale=C /var/postgresql/data [...]").
+environment, use "initdb --locale=C -D /var/postgresql/data [...]").
5) Temporarily support connecting without a password for local users by
editing pg_hba.conf to include "local all postgres trust"