Открываю терминал и запускаю сервер:
j_ch@playground:~/project/bin$ ./postgres -D ~/project/DemoDb
LOG: database system was shut down at 2019-09-22 16:03:02 +05
LOG: MultiXact member wraparound protections are now enabled
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
Вроде бы успешно.
Далее открываю другой терминал и пытаюсь соединиться с сервером БД:
j_ch@playground:~$ psql postgres
psql: could not connect to server: Нет такого файла или каталога
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Выдает ошибку - как справиться с ней? Если в последнем терминале ввести :
sudo service postgresql start
Ответом будет:
Failed to start postgresql.service: Unit postgresql.service not found
PostgreSQL версии 9.6(git clone https://github.com/[my fork on github]/postgres и собрано). PSQL автоматом не появился, пришлось отдельно устанавливать psql-client версии 9.5.1.