Monday, November 29, 2021

Step by step to create tablespace in PostgreSQL RDS instance

Step by step to create tablespace in PostgreSQL RDS instance


when you create tablespace in RDS postgreSQL instance ,you can  give the location  as any string.


Tablespace location  will be "PREFIXED " by /rdsdbdata/db/base/tablespace


CREATE TABLESPACE testTBSspace LOCATION '/test_data';



postgreSQL_dev=> \db+ testtbsspace

                                                   List of tablespaces

     Name     |  Owner   |                Location                 | Access privileges | Options |  Size   | Description

--------------+----------+-----------------------------------------+-------------------+---------+---------+-------------

 testtbsspace | db_admin | /rdsdbdata/db/base/tablespace/test_data |                   |         | 0 bytes |

(1 row)



drop  TABLESPACE testTBSspace;



postgreSQL_dev=> drop  TABLESPACE testTBSspace;

DROP TABLESPACE

postgreSQL_dev=> \db+ testtbsspace

                            List of tablespaces

 Name | Owner | Location | Access privileges | Options | Size | Description

------+-------+----------+-------------------+---------+------+-------------

(0 rows)

No comments:

Post a Comment