Forum OpenACS Q&A: OpenACS and PostgreSQL 11

Request notifications

Collapse
Posted by Michael Aram on
Dear community,

does anyone already have experiences with running OpenACS with PostgreSQL 11?

All the best,
Michael

Collapse
Posted by Jim Lynch on
Michael,

I guess no one does, and I don't either... and, I would think it's easy enough to try it out and see... why not give it a shot? if there are errors, post a log here so that people can try to address them.

-Jim

Collapse
Posted by Gustaf Neumann on

Dear all,

I've just updated my developer instance of OpenACS from PostgreSQL 10 to PostgreSQL 11 without any hassles under macOS. I was using mac ports binaries via "sudo port install postgresql11-server".

OpenACS works nicely without any problems (working with the HEAD from CVS).

Below are the steps i used for updating - maybe someone finds this helpful.

all the best
-gn

% assume we have postgres10 running
PG=postgresql10
PGBIN=/opt/local/lib/${PG}/bin
PGDB=/opt/local/var/db/${PG}/defaultdb
DATE=`date +"%Y-%m-%d"`
PGPORT=5432

% dump content of old database and stop database server
sudo -u postgres $PGBIN/pg_dumpall -p $PGPORT | gzip -9 > ~/openacs-dump-all-$DATE.gz
sudo -u postgres ${PGBIN}/pg_ctl -D $PGDB stop

% setup PostgreSQL 11 and initialize database
PG=postgresql11
PGBIN=/opt/local/lib/${PG}/bin
PGDB=/opt/local/var/db/${PG}/defaultdb

sudo -u postgres ${PGBIN}/initdb -D $PGDB

% start database server and restore content
sudo -u postgres ${PGBIN}/pg_ctl -D $PGDB -l /opt/local/var/log/${PG}/postgres.log start
gunzip < ~/openacs-dump-all-$DATE.gz |  $PGBIN/psql -U postgres
Collapse
Posted by Michael Aram on
The installation of OpenACS (HEAD) under PostgreSQL 11 fails without a small change in acs-kernel that I have just committed [1]. Beside that it seems to work okay – I am running a dev instance for some weeks already.

[1] http://cvs.openacs.org/browse/OpenACS/openacs-4/packages/acs-kernel/sql/postgresql/postgresql.sql?r1=1.51&r2=1.52

Collapse
Posted by Gustaf Neumann on
Thanks! It is probably worth to apply the same patch at least for the oacs-5-9 branch and the released tar files, since people trying fresh installs of the current OpenACS 5.9 release with PostgreSQL 11 will run into the same problem.

Background: PostgreSQL 11 dropped the "WITH" clause for "CREATE FUNCTION", which was deprecated since PG 7.2. The mentioned problem does not exist for upgrades to PG 11 (except probably for dumps before PG 7.2) but for new installs.

Collapse
Posted by Gustaf Neumann on
I have fixed now oacs-5.9 and provided an update script. such that installs from there will work with PG 11. Furthermore i have updated the install scripts to install per default via CVS, such that these installs work as well with PG 11. What's still missing is the release of a new tarball for OpenACS 5.9 for installs via tar.
Collapse
Posted by Maurizio Martignano on
Dear all,
this is just to mention that I have updated my Windows port of OpenACS which now includes PostgreSQL 11.1, OpenSSL 1.1.1a and Tcl/Tk 8.6.9.

https://www.spazioit.com/pages_en/sol_inf_en/windows-openacs_en/

I would like to use this opportunity to wish all of you a wonderful 2019!

Maurizio