小编Dem*_*mis的帖子

Postgres 无法创建表空间

我刚刚安装了一个外部 HD 来存储我的新表空间。

postgres@vostro ~ $ df -k
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/sdb1      480589520    71580 456082280   1% /mnt/DB

postgres@vostro ~ $ ls -l /mnt/DB/
total 4
drwxrwxrwx 2 postgres postgres 4096 May 25 17:02 postgres

demisc@vostro /mnt $ mount | grep -i sdb1
/dev/sdb1 on /mnt/DB type ext4 (rw,nosuid,nodev,relatime,data=ordered)
Run Code Online (Sandbox Code Playgroud)

我授予了所有必要的权限,以便 posgres 可以在/mnt/DB/postgres. 以下是用户组:

postgres@vostro ~ $ id
uid=123(postgres) gid=131(postgres) groups=131(postgres),112(ssl-cert),1000(demisc)
Run Code Online (Sandbox Code Playgroud)

发生在运行 create tablespace 命令时,我得到以下信息:

postgres=# create tablespace ts_project location '/mnt/DB/postgres';
ERROR:  could not set permissions …
Run Code Online (Sandbox Code Playgroud)

postgresql

7
推荐指数
1
解决办法
4544
查看次数

标签 统计

postgresql ×1