Fedora 28 kann Postgres nicht auf 10 aktualisieren

620
Bart Friederichs

Beim Starten des Postgres-Servers auf Fedora 28 erhalte ich folgende Fehlermeldung:

May 25 14:36:14 localhost.localdomain systemd[1]: Starting PostgreSQL database server... May 25 14:36:14 localhost.localdomain postgresql-check-db-dir[11816]: An old version of the database format was found. May 25 14:36:14 localhost.localdomain postgresql-check-db-dir[11816]: Use 'postgresql-setup --upgrade' to upgrade to version '10' May 25 14:36:14 localhost.localdomain postgresql-check-db-dir[11816]: See /usr/share/doc/postgresql/README.rpm-dist for more information. May 25 14:36:14 localhost.localdomain systemd[1]: postgresql.service: Control process exited, code=exited status=1 May 25 14:36:14 localhost.localdomain systemd[1]: postgresql.service: Failed with result 'exit-code'. May 25 14:36:14 localhost.localdomain systemd[1]: Failed to start PostgreSQL database server. 

Das Ausführen des Upgrades gibt mir Folgendes:

[root@localhost lib]# postgresql-setup --upgrade * Upgrading database. ERROR: pg_upgrade tool failed ERROR: Upgrade failed. * See /var/lib/pgsql/upgrade_postgresql.log for details. 

Die Protokolldatei gibt mir dann:

... Setting frozenxid and minmxid counters in new cluster ok Restoring global objects in the new cluster  *failure*  Consult the last few lines of "pg_upgrade_utility.log" for the probable cause of the failure. Failure, exiting 

(Warum fühlt sich das wie eine Schatzsuche an ...?), dann gibt mir das Protokoll:

... command: "/usr/bin/psql" --echo-queries --set ON_ERROR_STOP=on --no-psqlrc --dbname=template1 --host /var/lib/pgsql --port 5432 --username postgres -f "pg_upgrade_dump_globals.sql" >> "pg_upgrade_utility.log" 2>&1 /usr/bin/psql: symbol lookup error: /usr/bin/psql: undefined symbol: PQencryptPasswordConn 

Ah! Anscheinend fehlt mir ein Symbol. Aber wie bekomme ich dieses Symbol?

1

1 Antwort auf die Frage

2
Bart Friederichs

Es stellte sich heraus, dass ich einige alte Postgres-Bibliotheken herumliegen hatte:

[root@localhost pgsql]# ldd $(which psql) linux-vdso.so.1 (0x00007ffc3317a000) libpq.so.5 => /usr/pgsql-9.6/lib/libpq.so.5 (0x00007f27a2913000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f27a26f4000) libreadline.so.7 => /lib64/libreadline.so.7 (0x00007f27a24a7000) 

Wie Sie sehen, libpqverweist auf eine ältere Version. Nur das gesamte Verzeichnis zu entfernen, war die Lösung. Das libpqIn /lib64/hatte die richtigen Symbole und mein Upgrade lief einwandfrei.