You are not logged in.

#1 2021-01-03 07:59:56

betaknot
Member
From: Palo Alto, California
Registered: 2020-04-18
Posts: 4

[SOLVED] PostgreSQL stopped working after system upgrade(s)

I have postgresql version 12.4 installed and postgresql.service enabled, which had been running successfully on my local machine for months. pacman ignores postgresql and postgresql-libs per the wiki's recommendation to only manually upgrade, which I have not yet done. Thus far, I have been able to create and manage databases with no issues. My last interaction with psql was several weeks ago (maybe 5-10 system upgrades since), and I noticed today it had stopped working when I ran:

$ psql -l
psql: error: could not connect to server: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/run/postgresql/.s.PGSQL.5432"?

I stopped and disabled the service, then ran:

$ systemctl start postgresql.service
Job for postgresql.service failed because the control process exited with error code.
See "systemctl status postgresql.service" and "journalctl -xe" for details.
$ systemctl status postgresql.service
● postgresql.service - PostgreSQL database server
     Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Sat 2021-01-02 22:39:54 PST; 14s ago
    Process: 1993 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data (code=exited, status=0/SUCCESS)
    Process: 1995 ExecStart=/usr/bin/postgres -D ${PGROOT}/data (code=exited, status=127)
   Main PID: 1995 (code=exited, status=127)

Jan 02 22:39:54 xwing systemd[1]: Starting PostgreSQL database server...
Jan 02 22:39:54 xwing postgres[1995]: /usr/bin/postgres: error while loading shared libraries: libicui18n.so.67: cannot open shared object file: No such file or directory
Jan 02 22:39:54 xwing systemd[1]: postgresql.service: Main process exited, code=exited, status=127/n/a
Jan 02 22:39:54 xwing systemd[1]: postgresql.service: Failed with result 'exit-code'.
Jan 02 22:39:54 xwing systemd[1]: Failed to start PostgreSQL database server.

I notice that in /lib and /lib64 there is libicui18n.so.68.2, does this mean that postgresql is trying to use a shared library that has been replaced during system upgrades (libicui18n.so.67)?

My issue looks nearly identical to this link, where the resolution seemed to be rebuilding the postgresql package with the new, existing ICU. I don't have any version constraints, I would just like to upgrade postgresql successfully so as not to lose data and follow best practices (this is my first upgrade), but I believe I need psql to run successfully in order to do this. Is my solution the same as the link, where I should rebuild my version of postgresql (12.4) now that the newer ICU has been installed on my machine, or do I have any other options (such as simply upgrading without needing psql 12.4 to run in order to dump the data)? Thank you!

(First post, please excuse any errors; let me know what other information will be helpful.)

Last edited by betaknot (2021-01-03 22:47:46)

Offline

#2 2021-01-03 12:19:06

loqs
Member
Registered: 2014-03-06
Posts: 19,029

Re: [SOLVED] PostgreSQL stopped working after system upgrade(s)

You were intended to not perform the update where pacman warned that postgresql would not be updated as it was on the ignore list until you could perform the postgresql update.
You can either try https://aur.archlinux.org/packages/icu67/ to provide libicui18n.so.67 or Arch_Linux_Archive#How_to_restore_all_packages_to_a_specific_date to downgrade the system to a date when icu was still at version 67.

Offline

#3 2021-01-03 22:47:24

betaknot
Member
From: Palo Alto, California
Registered: 2020-04-18
Posts: 4

Re: [SOLVED] PostgreSQL stopped working after system upgrade(s)

Thanks loqs, yeah I see how this got messed up and what to do next time. I reverted my system to an older version when postgresql was compatible with the shared library, performed the upgrade, then re-upgraded my system. Thank you for the response.

Offline

Board footer

Powered by FluxBB