Posted on 9th September 2024|39 views
What is the Tablespace location in PostgreSQL?
Posted on 9th September 2024| views
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.
conclusion:
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.