Forum OpenACS Q&A: Re: OpenACS and PostgreSQL 11

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