Posted on 27th February 2024
Creating a tablespace Syntax:
CREATE TABLESPACE fastspace LOCATION '/mnt/sda1/postgresql/data';
Above syntax creates a tablespace which will allocate file locations 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.
Tablespace functions as this is a very efficient feature in PostgreSQL as this can use for data backup(pg_basebackup), Creating, moving and making temporary objects and so on.
STILL GOT QUERIES?