Upgrade from 10 to 11
I've just (belatedly) updated Postgresql from version 10 to 11, and had a couple of problems.
pg_upgrade failed, and I couldn't see anything that looked like a helpful error message, so I resorted to the manual method as described in section 7.1 of this page.
That initially failed too, but I got it to work by using
/opt/pgsql-10/bin/pg_dumpall instead of just
pg_dumpall. So the steps I used were:
# systemctl stop postgresql.service # mv /var/lib/postgres/data /var/lib/postgres/olddata # mkdir /var/lib/postgres/data # chown postgres:postgres /var/lib/postgres/data [postgres]$ initdb -D '/var/lib/postgres/data' [postgres]$ /opt/pgsql-10/bin/pg_ctl -D /var/lib/postgres/olddata/ start [postgres]$ /opt/pgsql-10/bin/pg_dumpall -f /tmp/old_backup.sql [postgres]$ /opt/pgsql-10/bin/pg_ctl -D /var/lib/postgres/olddata/ stop # systemctl start postgresql.service [postgres]$ psql -f /tmp/old_backup.sql postgres
- It is hard to argue about errors without seeing them. Upstream recommends to use pg_dumpall from the newer version, so you should probably ask upstream about the problems. -- Lahwaacz (talk) 18:43, 18 November 2018 (UTC)
- I failed to note the exact errors at the time, but one related to a version of a library being missing, so I assumed that the problems were caused by the fact that my whole system had been very out of date before I did a system update and then upgraded postgresql. My point was that a tweak to the instructions on this page was required to solve the problem. ChrisDennis (talk) 18:45, 23 November 2018 (UTC)