Не могу подключиться к БД PostgreSQL14. Не запускается служба PostgreSQL

Когда я пытаюсь подключиться через SQL Shell выходит ошибка (через pgAdmin4 также не подключается):

psql: error: connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061) Is the server running on that host and accepting TCP/IP connections?

В службах Windows PostgreSQL не запускается (установлена Win10).

Это решение не помогло https://stackoverflow.com/a/27568135/17655569.

Также пробовал переустановить по этой инструкции https://webkul.com/blog/postgresql-windows-installation-problem-running-post-install-step-installation-may-not-complete-correctly/. Но к сожалению, помогает только до первой перезагрузки.

Как можно решить данную проблему? Я начинаю учить язык программирования Java. Может твообще установить другую СУБД? SQLite 3 подойдет?

Вот нашел в логах:

ВАЖНО: XX000: C:\Program Files\PostgreSQL\14\bin\postgres.exe: подходящий исполняемый файл postgres не найден ПОЛОЖЕНИЕ: getInstallationPaths, postmaster.c:1495


Ответы (1 шт):

Автор решения: art16ws

если это ещё актуально, мне помогло удаление autorun (chcp 1251) в реестре.

HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\Autorun

Ссылка на это решение: https://stackoverflow.com/questions/65413979/can-not-run-postgresql-by-pg-ctl

→ Ссылка