Posted on 29th April 2025|77 views
How to create Tablespace in PostgreSQL?
Posted on 29th April 2025| views
One of the most efficient features in PostgreSQL as this feature allows the superuser to define or allocate a location to store the files holding the database objects.
Creating a tablespace Syntax:
CREATE TABLESPACE fastspace LOCATION '/mnt/sda1/postgresql/data';
The above syntax creates a tablespace which used to allocate files location which holds database objects.
By default, once we create a tablespace, then it creates two dataspaces:
Pg_global: it is used for shared systems when the database cluster initialised.
Pg_default: it creates default tablespace as template1, template0.