Unraid-Postgres database failing to start.
A couple of days ago Immich stopped working and I have traced it to a Postrgres 14 issue. logs say:
PostgreSQL Database directory appears to contain a database; Skipping initialization
2024-12-10 11:05:00.153 PST [1] LOG: starting PostgreSQL 14.15 (Debian 14.15-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2024-12-10 11:05:00.154 PST [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2024-12-10 11:05:00.155 PST [1] LOG: listening on IPv6 address "::", port 5432
2024-12-10 11:05:00.337 PST [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-12-10 11:05:00.502 PST [25] LOG: database system was shut down at 2024-12-05 03:55:00 PST
2024-12-10 11:05:00.502 PST [25] LOG: invalid primary checkpoint record
2024-12-10 11:05:00.502 PST [25] PANIC: could not locate a valid checkpoint record
2024-12-10 11:05:00.503 PST [1] LOG: startup process (PID 25) was terminated by signal 6: Aborted
2024-12-10 11:05:00.503 PST [1] LOG: aborting startup due to startup process failure
2024-12-10 11:05:00.513 PST [1] LOG: database system is shut down
Any suggestions to recover the database please?
PostgreSQL Database directory appears to contain a database; Skipping initialization
2024-12-10 11:05:00.153 PST [1] LOG: starting PostgreSQL 14.15 (Debian 14.15-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2024-12-10 11:05:00.154 PST [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2024-12-10 11:05:00.155 PST [1] LOG: listening on IPv6 address "::", port 5432
2024-12-10 11:05:00.337 PST [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-12-10 11:05:00.502 PST [25] LOG: database system was shut down at 2024-12-05 03:55:00 PST
2024-12-10 11:05:00.502 PST [25] LOG: invalid primary checkpoint record
2024-12-10 11:05:00.502 PST [25] PANIC: could not locate a valid checkpoint record
2024-12-10 11:05:00.503 PST [1] LOG: startup process (PID 25) was terminated by signal 6: Aborted
2024-12-10 11:05:00.503 PST [1] LOG: aborting startup due to startup process failure
2024-12-10 11:05:00.513 PST [1] LOG: database system is shut down
Any suggestions to recover the database please?