Difference between revisions of "Talk:PostgreSQL"

From ArchWiki
Jump to: navigation, search
(Suggested update to manual upgrade instructions)
m (add section title, see Help:Discussion)
Line 1: Line 1:
 +
== Upgrade from 10 to 11 ==
 +
 
I've just (belatedly) updated Postgresql from version 10 to 11, and had a couple of problems.
 
I've just (belatedly) updated Postgresql from version 10 to 11, and had a couple of problems.
  

Revision as of 18:34, 18 November 2018

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

ChrisDennis (talk) 18:26, 18 November 2018 (UTC)