postgresql - Creating a Postgres tablepsace on Mac on an external harddisk
问题描述
I'm trying to create a tablespace for Postgres on an external Disk (SSD connected via TB3) The disk is mounted like this: /dev/disk3s1 on /Volumes/External2TB (apfs, local, nodev, nosuid, journaled) Note that I already disabled the "Ignore ownership" option (noowners) as I think that may have been causing permission problems as postgres is running with its own userid. I want the tablespace in /Columes/External2TB/PostgreSQL/space2.
I have:
$ ls -lad /Volumes/External2TB/PostgreSQL/
drwxr-xr-x 3 postgres daemon 96 Apr 19 01:11 /Volumes/External2TB/PostgreSQL/
and
$ ls -lad /Volumes/External2TB/PostgreSQL/space2/
drwx------ 2 postgres daemon 64 Apr 19 01:11 /Volumes/External2TB/PostgreSQL/space2/
postgres:daemon are indeed the uid:gid that the postgres process is running under
I connect as user postgres with psql and I get:
postgres=# create tablespace space2 location '/Volumes/External2TB/PostgreSQL/space2';
ERROR: could not set permissions on directory "/Volumes/External2TB/PostgreSQL/space2": Operation not permitted
I can run a shell as the postgres user and do a chmod at /Volumes/External2TB/PostgreSQL/space2 so I'm at a total loss as to why the postgres process wouldn't be able to do that...
解决方案
推荐阅读
- c++ - 从文件读取时读取访问冲突
- azure - 如何使用 Azure PowerShell 获取 Azure 应用程序注册的创建日期?
- ios - 自动填充 Chrome 扩展程序如何工作?我可以在 iOS 应用程序中实现类似的东西吗?
- javascript - 如何存储 iFrame/table 中的文本元素
- javascript - Vue 组件库 - 无法从 dist 导入
- c# - 如何将循环迭代结果存储到列表中?
- python - 为什么h5py数据集的并行分配没有输出?
- css - Css div 浮动在 flex 背景图像上
- javascript - 创建一个可以添加/嵌入到任何站点的导航栏
- c# - 如何请求 Firebase Functions 的响应?