Упала и запускалась база данных PostgreSQL на Ubuntu, при старте сервера получал такой ответ
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 -l postgresql.service и получил следующе:
postgresql.service - PostgreSQL database server Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2023-07-31 16:59:39 MSK; 46s ago Docs: man:postgres(1) Process: 2152023 ExecStart=/usr/local/pgsql/bin/postgres -D /home/postgres/data (code=exited, status=1/FAILURE) Main PID: 2152023 (code=exited, status=1/FAILURE) LOG: database system was interrupted while in recovery at 2023-07-31 21:58:52 +08 HINT: This probably means that some data is corrupted and you will have to use the last backup for re LOG: database system was not properly shut down; automatic recovery in progress FATAL: could not open directory "pg_tblspc/6nqost/PG_13_202007201": Not a directory LOG: startup process (PID 2152036) exited with exit code 1 LOG: aborting startup due to startup process failure LOG: database system is shut down ophiqelec2-vps-4 systemd[1]: postgresql.service: Main process exited, code=exited, status=1/FAILURE ophiqelec2-vps-4 systemd[1]: postgresql.service: Failed with result 'exit-code'. ophiqelec2-vps-4 systemd[1]: Failed to start PostgreSQL database server.
Решением оказалось удаление файла 6nqost (судя по «could not open directory «pg_tblspc/6nqost/PG_13_202007201»: Not a directory» файлом он быть не должен) из каталога pg_tblspc (его перенес в домашнюю директорию на всякий случай) и запуск службы.