Postgresql数据到SSD驱动器

时间:2016-11-16 21:06:08

标签: postgresql postgis

我的桌面计算机上安装了postgresql,只添加了512 GB SSD驱动器。我以为我会将数据迁移到SSD,所以我按照这些说明https://www.digitalocean.com/community/tutorials/how-to-move-a-postgresql-data-directory-to-a-new-location-on-ubuntu-16-04

现在,当我尝试使用psql登录postgres时,我得到了:

psql: could not connect to server: No such file or directory
 Is the server running locally and accepting
 connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

以下是sudo systemctl status postgresql的结果

postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
Active: active (exited) since Wed 2016-11-16 13:25:32 MST; 35min ago
Process: 995 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 995 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/postgresql.service

Nov 16 13:25:32 arscoftc1rrgaf6 systemd[1]: Starting PostgreSQL RDBMS...
Nov 16 13:25:32 arscoftc1rrgaf6 systemd[1]: Started PostgreSQL RDBMS.

以下是pg_lsclusters

的结果
Ver Cluster Port Status Owner Datadirectory      Log file
9.6 main    5432 down   postgres /media/rowangaffney/88e94ba6-a713-4d87-a066-0ca08f8fd856/DB_DATA/postgresql/9.6/main /var/log/postgresql/postgresql-9.6-main.log

此处还有systemctl status postgresql@9.6-main.service

的结果
● postgresql@9.6-main.service - PostgreSQL Cluster 9.6-main
Loaded: loaded (/lib/systemd/system/postgresql@.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2016-11-17 08:24:10 MST; 8s ago
Process: 11618 ExecStart=postgresql@%i --skip-systemctl-redirect %i start (code=exited, status=1/FAILURE)

和ps auxw | grep postgres

rowanga+ 11942  0.0  0.0  14224   944 pts/4    S+   08:36   0:00 grep --color=auto postgres

我跑的时候;     /usr/lib/postgresql/9.6/bin/postgres -d 1 -D /mnt/ssd/postgresql/9.6/main -c config_file = / etc / postgresql / 9.6 / main / postgresql.conf

启动过程卡在我的三个数据库的autovacuum循环中:

2016-11-17 15:07:21 MST [7680-1] DEBUG:  autovacuum: processing database "cper"
2016-11-17 15:07:41 MST [7694-1] DEBUG:  autovacuum: processing database "blm_seeds2"
2016-11-17 15:08:01 MST [7700-1] DEBUG:  autovacuum: processing database "postgres"
2016-11-17 15:08:21 MST [7701-1] DEBUG:  autovacuum: processing database "cper"
2016-11-17 15:08:41 MST [7702-1] DEBUG:  autovacuum: processing database "blm_seeds2"
2016-11-17 15:09:01 MST [7708-1] DEBUG:  autovacuum: processing database "postgres"
2016-11-17 15:09:21 MST [7712-1] DEBUG:  autovacuum: processing database "cper"
2016-11-17 15:09:41 MST [7713-1] DEBUG:  autovacuum: processing database "blm_seeds2"
2016-11-17 15:10:01 MST [7716-1] DEBUG:  autovacuum: processing database "postgres"

任何人都知道如何解决这个问题?

0 个答案:

没有答案