Postgresql изменяют dir данных и ошибку сокета

Когда я chenge postgresql каталог данных в

/etc/postgresql/9.5/main/postgresql.conf

сформируйте путь по умолчанию

/var/lib/postgresql/9.5/main

к моему пользовательскому

/home/user/postgresql/9.5/main

Используйте это руководство https://www.digitalocean.com/community/tutorials/how-to-move-a-postgresql-data-directory-to-a-new-location-on-ubuntu-16-04

У меня есть ошибка:

psql: не мог соединиться с сервером: Никакой такой файл или каталог Не Является сервером, работающим локально и принимающим соединения на сокете домена Unix "/var/run/postgresql/.s. PGSQL.5432"?

Когда я неправильно?

UPD1

ubuntu@rails-serv-1:~$ sudo service postgresql status
● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor prese
Active: active (exited) since Wed 2016-10-19 08:52:12 UTC; 4min 52s ago
Process: 854 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 854 (code=exited, status=0/SUCCESS)
Tasks: 0
Memory: 0B
CPU: 0
CGroup: /system.slice/postgresql.service

Oct 19 08:52:12 rails-serv-1 systemd[1]: Starting PostgreSQL RDBMS...
Oct 19 08:52:12 rails-serv-1 systemd[1]: Started PostgreSQL RDBMS.

UPD2

ubuntu@rails-serv-1:~$ sudo ps auxww | grep [p]ostgresql
ubuntu@rails-serv-1:~$

пусто

ubuntu@rails-serv-1:~$  sudo ls -al /var/run/postgresql
total 0
drwxrwsr-x  2 postgres postgres  40 Oct 19 21:28 .
drwxr-xr-x 24 root     root     900 Oct 19 21:32 ..

UPD3

журнал

"2016-10-21 07:25:54 UTC [3493-1] FATAL: data directory "/var/lib/postgresql-new/9.5/main" has group or world access 2016-10-21 07:25:54 UTC [3493-2] DETAIL: Permissions should be u=rwx (0700)."

полномочия папок

root@rails-serv-1:~# cd /var/lib/postgresql-new/
root@rails-serv-1:/var/lib/postgresql-new# ls -lh
total 4.0K
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 9.5
root@rails-serv-1:/var/lib/postgresql-new# cd 9.5/
root@rails-serv-1:/var/lib/postgresql-new/9.5# ls -lh
total 4.0K
drwx------ 1 postgres postgres 4.0K Oct 18 23:01 main
root@rails-serv-1:/var/lib/postgresql-new/9.5# cd main/
root@rails-serv-1:/var/lib/postgresql-new/9.5/main# ls -lh
total 80K
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 base
drwx------ 1 postgres postgres 4.0K Oct 18 23:01 global
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_clog
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_commit_ts
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_dynshmem
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_logical
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_multixact
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_notify
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_replslot
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_serial
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_snapshots
drwx------ 1 postgres postgres 4.0K Oct 18 23:01 pg_stat
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_stat_tmp
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_subtrans
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_tblspc
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_twophase
-rw------- 1 postgres postgres    4 Oct 18 23:00 PG_VERSION
drwx------ 1 postgres postgres 4.0K Oct 18 23:00 pg_xlog
-rw------- 1 postgres postgres   88 Oct 18 23:00 postgresql.auto.conf
-rw------- 1 postgres postgres  133 Oct 18 23:00 postmaster.opts
0
задан 21 October 2016 в 11:12

0 ответов

Другие вопросы по тегам:

Похожие вопросы: