在PostgreSQL RDS上创建表空间

Axe*_*hoa 7 postgresql amazon-web-services amazon-rds

我是亚马逊RDS的新手.我正在尝试创建应用程序的表空间,但我找不到应该存储它的位置.

是否可以在PostgreSQL RDS上创建表空间?

Jos*_*idt 6

我没有找到关于此的RDS文档,但显然Postgres表空间在RDS上运行良好.您无法直接访问RDS正在使用的基础EBS卷,但是如果您尝试使用某个任意目录的CREATE TABLESPACE命令:

CREATE TABLESPACE testspace LOCATION '/foo/bar/baz';

您可以看到表空间的创建方式如下: mydb=> \db List of tablespaces Name | Owner | Location
------------+------------+------------------------------------------- pg_default | rdsadmin | pg_global | rdsadmin | testspace | db_user | /rdsdbdata/db/base/tablespace/foo/bar/baz (3 rows)

你应该能够在该表空间中创建表格: mydb=> CREATE TABLE test (a int) TABLESPACE testspace ; CREATE TABLE