My upgrade from Fedora 23 to 24 left me with a broken postgresql.
# /usr/libexec/postgresql-ctl start -D /db/pgsql/data -s -w -t 270 FATAL: 22023: database files are incompatible with server DETAIL: The data directory was initialized by PostgreSQL version 9.4, which is not compatible with this version 9.5.3. LOCATION: ValidatePgVersion, miscinit.c:1364 pg_ctl: could not start server Examine the log output.
<Note: my data are in /db/pgsql/data>
--------------------------------------------- # postgresql-setup --upgrade
* Upgrading database. ERROR: pg_upgrade tool failed ERROR: Upgrade failed. * See /var/lib/pgsql/upgrade_postgresql.log for detai ------------------------------------------
It seems I must install 9.4.8 alongside my current 9.5.3, then dump a backup from 9.4.8 and restore with 9.5.3. Is it possible to install 9.4.8 ? I found 9.4.8 .rpm packages for Fedora 23. How can I install them without touching anything to 9.5?
Is there any other solution to solve this initialisation issue?
Thank you for help in solving this postgresql issue.
On 07/08/16 20:10, arnaud gaboury wrote:
My upgrade from Fedora 23 to 24 left me with a broken postgresql.
# /usr/libexec/postgresql-ctl start -D /db/pgsql/data -s -w -t 270 FATAL: 22023: database files are incompatible with server DETAIL: The data directory was initialized by PostgreSQL version 9.4, which is not compatible with this version 9.5.3. LOCATION: ValidatePgVersion, miscinit.c:1364 pg_ctl: could not start server Examine the log output.
<Note: my data are in /db/pgsql/data>
# postgresql-setup --upgrade
- Upgrading database.
ERROR: pg_upgrade tool failed ERROR: Upgrade failed.
- See /var/lib/pgsql/upgrade_postgresql.log for detai
It seems I must install 9.4.8 alongside my current 9.5.3, then dump a backup from 9.4.8 and restore with 9.5.3. Is it possible to install 9.4.8 ? I found 9.4.8 .rpm packages for Fedora 23. How can I install them without touching anything to 9.5?
Is there any other solution to solve this initialisation issue?
Thank you for help in solving this postgresql issue.
I don't think you can have 2 versions installed on the same system.
One thought would be to install VirtualBox and create a VM and a compatible version of postgresql with access to the database and use the VM to dump the backup.
On Friday, July 8, 2016 2:10:43 PM CDT arnaud gaboury wrote:
My upgrade from Fedora 23 to 24 left me with a broken postgresql.
# /usr/libexec/postgresql-ctl start -D /db/pgsql/data -s -w -t 270 FATAL: 22023: database files are incompatible with server DETAIL: The data directory was initialized by PostgreSQL version 9.4, which is not compatible with this version 9.5.3. LOCATION: ValidatePgVersion, miscinit.c:1364 pg_ctl: could not start server Examine the log output.
<Note: my data are in /db/pgsql/data>
# postgresql-setup --upgrade
- Upgrading database.
ERROR: pg_upgrade tool failed ERROR: Upgrade failed.
- See /var/lib/pgsql/upgrade_postgresql.log for detai
It seems I must install 9.4.8 alongside my current 9.5.3, then dump a backup from 9.4.8 and restore with 9.5.3. Is it possible to install 9.4.8 ? I found 9.4.8 .rpm packages for Fedora 23. How can I install them without touching anything to 9.5?
Is there any other solution to solve this initialisation issue?
Thank you for help in solving this postgresql issue.
I've found that in order for postgresql-upgrade to work, I've needed to remove my specific postgresql.conf customizations such as:
ssl = on krb_server_keyfile = 'postgres.keytab' shared_preload_libraries = 'pg_journal'
And change the local entry for the postgres user in pg_hba.conf to trust: TYPE DATABASE USER ADDRESS METHOD local all postgres trust
Then run $ postgresql-setup --upgrade
After the upgrade, I replace the configuration customizations and $ systemctl restart postgresql.service