[英]AWS RDS PostgreSQL Tablespace
I created an AWS RDS postgres instance.我创建了一个 AWS RDS postgres 实例。 When creating i was prompted to create user.
创建时提示我创建用户。 There is no reason for creating tablespaces with location in AWS RDS?
没有理由在 AWS RDS 中创建具有位置的表空间? The reason is when creating a database i want the database to goto the tablespace i created.
原因是在创建数据库时我希望数据库转到我创建的表空间。 When i run the below command
当我运行以下命令时
CREATE USER test;
CREATE TABLESPACE test OWNER test LOCATION '/test_data';
CREATE DATABASE test WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'C' LC_CTYPE = 'C' TABLESPACE = test;
ERROR: permission denied for tablespace test
I logged into postgres using test_admin user to run the above commands.我使用 test_admin 用户登录 postgres 以运行上述命令。 The test_admin is the account i created during the RDS instance provisioning.
test_admin 是我在 RDS 实例配置期间创建的帐户。 Is that the only account that i should be using above to create all of the DB objects from that point?
这是我应该在上面使用的唯一帐户来从那时起创建所有数据库对象吗?
Do you want the owner of the database to be test
as well?您是否希望数据库的所有者也被
test
? If so, add that into your CREATE DATABASE...
.如果是这样,请将其添加到您的
CREATE DATABASE...
。 Otherwise, you'll probably need to give the test_admin
user permission on the test
tablespace before trying to create it.否则,您可能需要在尝试创建
test
表空间之前授予test_admin
用户权限。
Tablespaces in postgres RDS are located in /rdsdbdata/db/base/tablespace/
postgres RDS 中的表空间位于
/rdsdbdata/db/base/tablespace/
and I think this question has been answered here Create tablespace on PostgreSQL RDS我认为这个问题已经在这里回答了Create tablespace on PostgreSQL RDS
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.