Postgresql server unable to start after update

After installing the last system update yesterday (* [[Stable Update] 2020-12-30 - Kernels, KDE, Cinnamon, LibreOffice, Python 3.9, Mesa 20.3.1]*), the postgres server is unable to start.

sudo systemctl restart postgresql
Job for postgresql.service failed because the control process exited with error code.
See "systemctl status postgresql.service" and "journalctl -xe" for details.

With additional info:

systemctl status postgresql.service
● postgresql.service - PostgreSQL database server
 Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; vendor preset: disabled)
 Active: failed (Result: exit-code) since Fri 2021-01-01 07:42:23 CET; 8s ago
Process: 4888 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data (code=exited, status=1/FAILURE)

jan 01 07:42:23 luni systemd[1]: Starting PostgreSQL database server...
jan 01 07:42:23 luni postgres[4888]: An old version of the database format was found.
jan 01 07:42:23 luni postgres[4888]: See https://wiki.archlinux.org/index.php/PostgreSQL#Upgrading_PostgreSQL
jan 01 07:42:23 luni systemd[1]: postgresql.service: Control process exited, code=exited, status=1/FAILURE
jan 01 07:42:23 luni systemd[1]: postgresql.service: Failed with result 'exit-code'.
jan 01 07:42:23 luni systemd[1]: Failed to start PostgreSQL database server.

And:

journalctl -xe                    
β–‘β–‘ Support: https://forum.manjaro.org/c/support
β–‘β–‘  
β–‘β–‘ An ExecStartPre= process belonging to unit postgresql.service has exited.
β–‘β–‘  
β–‘β–‘ The process' exit code is 'exited' and its exit status is 1.
jan 01 08:13:32 luni systemd[1]: postgresql.service: Failed with result 'exit-code'.
β–‘β–‘ Subject: Unit failed
β–‘β–‘ Defined-By: systemd
β–‘β–‘ Support: https://forum.manjaro.org/c/support
β–‘β–‘  
β–‘β–‘ The unit postgresql.service has entered the 'failed' state with result 'exit-code'.
jan 01 08:13:32 luni systemd[1]: Failed to start PostgreSQL database server.
β–‘β–‘ Subject: A start job for unit postgresql.service has failed
β–‘β–‘ Defined-By: systemd
β–‘β–‘ Support: https://forum.manjaro.org/c/support
β–‘β–‘  
β–‘β–‘ A start job for unit postgresql.service has finished with a failure.
β–‘β–‘  
β–‘β–‘ The job identifier is 8842 and the job result is failed.
jan 01 08:13:32 luni audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=postgresql comm="systemd" >
jan 01 08:13:32 luni kernel: audit: type=1130 audit(1609485212.935:265): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='uni>
jan 01 08:13:32 luni sudo[9710]: pam_unix(sudo:session): session closed for user root
jan 01 08:13:32 luni audit[9710]: USER_END pid=9710 uid=1000 auid=1000 ses=2 msg='op=PAM:session_close grantors=pam_limits,p>
jan 01 08:13:32 luni audit[9710]: CRED_DISP pid=9710 uid=1000 auid=1000 ses=2 msg='op=PAM:setcred grantors=pam_faillock,pam_>
jan 01 08:13:32 luni kernel: audit: type=1106 audit(1609485212.939:266): pid=9710 uid=1000 auid=1000 ses=2 msg='op=PAM:sessi>
jan 01 08:13:32 luni kernel: audit: type=1104 audit(1609485212.939:267): pid=9710 uid=1000 auid=1000 ses=2 msg='op=PAM

Does anyone by any chance know to get postgres running again?

In the past a user solved the β€œOld version of database format” by following archlinux wiki page mentioned above in the systemctl status output.

Thanks a lot! I followed the instructions and it works again.
For some reason I missed the

See https://wiki.archlinux.org/index.php/PostgreSQL#Upgrading_PostgreSQL

message.
And I now know how to fix it next time :slightly_smiling_face:.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.