I updated some Cygwin packages and now I can't start Postgres:
$ /usr/sbin/postmaster
FATAL: database files are incompatible with server
DETAIL: The data directory was initialized by PostgreSQL version 8.2, which is not compatible with this version 9.2.4.
I tried pg_upgrade but you need to specify both the old and new binary. Plus, pg_upgrade says it only works with 8.3.
I thought I could use setup-x86.exe to pick the previous version, which is 8.2.11-1, however when I install that, then I can't start Postgres:
$ /usr/sbin/postgres.exe
Bad system call (core dumped)
Best Answer
Upgrading from 9.2 to 9.3
/setup-x86.exe -X
with the-X
option to ignore setup signatures (they aren't archived).cygrunsrv -S cygserver
/usr/sbin/postmaster &
or/usr/sbin/pg_ctl start
pg_dumpall > /tmp/pg.sql
/usr/sbin/pg_ctl.exe stop
mv /usr/share/postgresql /usr/share/postgresql-9.2
/usr/sbin/pg_ctl init
/usr/sbin/pg_ctl.exe start
psql -d postgres -f /tmp/pg.sql