I've just tried pg_upgrade following the pkg-readme. It went OK in the end but there were some bumps along the way. A few notes:
| 2) Upgrade your PostgreSQL package with pkg_add. | # pkg_add -ui postgresql-pg_upgrade -> fails unless you already have it installed. I think just "pkg_add psotgresql-pg_upgrade" might be enough to get it updated? | 3) Backup your old data directory: | # mv /var/postgresql/data /var/postgresql/data.old -> this didn't do what i expected because i had an old data.old so it ended up in data.old/data/. i eventually worked it out after wondering why pg_upgrade was telling me the version didn't match. | 6) Run pg_upgrade: | # su _postgresql -c "pg_upgrade -b /usr/local/bin/postgresql-9.5/ | -B /usr/local/bin -U postgres | -d /var/postgresql/data.old/ -D /var/postgresql/data" -> needs \ at the end of lines -> current directory needs to be writable by _postgresql; maybe cd /tmp first? -> running it with \ added gives this: --snip-- # su _postgresql -c "pg_upgrade -b /usr/local/bin/postgresql-9.5/ \ > -B /usr/local/bin -U postgres \ > -d /var/postgresql/data.old/ -D /var/postgresql/data" Performing Consistency Checks ----------------------------- Checking cluster versions ok connection to database failed: fe_sendauth: no password supplied could not connect to old postmaster started with the command: "/usr/local/bin/postgresql-9.5/pg_ctl" -w -l "pg_upgrade_server.log" -D "/var/postgresql/data.old/" -o "-p 50432 -b -c listen_addresses='' -c unix_socket_permissions=0700 -c unix_socket_directories='/tmp'" start Failure, exiting --snip-- ... either we need instructions to temporarily switch from "local all all md5" to "local all all trust", or show how to set the password (which I haven't figured out yet for pg_upgrade).