Page MenuHomeSoftware Heritage

Upgrade to PostgreSQL 9.6
Closed, MigratedEdits Locked

Description

PostgreSQL 9.6 has been released on 2016-09-29. We should investigate an upgrade.

https://www.postgresql.org/about/news/1703/

Event Timeline

olasd changed the task status from Open to Work in Progress.Oct 10 2016, 2:29 PM
olasd claimed this task.

Trying to do the upgrade of the hdd cluster using the pg_upgrade method.

  1. initdb the new cluster : sudo LC_ALL=C.UTF-8 pg_createcluster -d /srv/softwareheritage/postgres-hdd/9.6/hdd 9.6 hdd
  2. merge config from old cluster to new (postgresql.conf, pg_hba.conf)
  3. create symlink to config in the new cluster for pg_upgrade : ln -s /etc/postgresql/9.6/hdd/postgresql.conf /srv/softwareheritage/postgres-hdd/9.6/hdd/postgresql.conf
  4. check that pg_upgrade can perform the upgrade. this makes sure that both clusters are compatible : /usr/lib/postgresql/9.6/bin/pg_upgrade --check --link --old-bindir /usr/lib/postgresql/9.5/bin --new-bindir /usr/lib/postgresql/9.6/bin --old-datadir /srv/softwareheritage/postgres-hdd/9.5/hdd/ --new-datadir /srv/softwareheritage/postgres-hdd/9.6/hdd --old-port 5435 --new-port 5437
  5. perform the upgrade (remove --check from previous commandline) and wait

The symlink step has to be done for both clusters (old and new).

All clusters have been upgraded to PostgreSQL 9.6.0 following the pg_upgrade procedure.