logo-MindMajix
H
Harshel Mike

Posted on 25th July 2024|77 views

0
votes

Postgresql Create Tablespace

How to create Tablespace in PostgreSQL?

1 answers
Answers
P
naseer mohammad

Posted on 25th July 2024| 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.

 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo

  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos
Name
Course *
Email *
Phone Number