Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create tablespace on PostgreSQL RDS

I am new on Amazon RDS. I'm trying to create the tablespaces of my application, but I can't find where I should store it.

Is it possible to create tablespaces on PostgreSQL RDS?

like image 413
Axel Paschoa Avatar asked Sep 21 '16 12:09

Axel Paschoa


1 Answers

I didn't find RDS documentation about this, but apparently Postgres tablespaces work fine on RDS. You don't have direct access to the underlying EBS volume that RDS is using, but if you try a CREATE TABLESPACE command with some arbitrary directory:

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

You can see that the tablespace gets created like so: 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)

And you should be able to create tables in that tablespace just fine: mydb=> CREATE TABLE test (a int) TABLESPACE testspace ; CREATE TABLE

like image 156
Josh Kupershmidt Avatar answered Sep 23 '22 15:09

Josh Kupershmidt