Re: location for pg_default tablespace - Mailing list pgsql-general

From Greg Smith
Subject Re: location for pg_default tablespace
Date
Msg-id 4B4C0D93.30005@2ndquadrant.com
Whole thread Raw
In response to Re: location for pg_default tablespace  (AI Rumman <rummandba@gmail.com>)
Responses Re: location for pg_default tablespace  (AI Rumman <rummandba@gmail.com>)
List pgsql-general
AI Rumman wrote:
> But actually I want to know that why the value in spclocation is null
> is pg_tablespace for pg_default.
> Moreover, $PGDATA/pg_tblspc has no file.
> Could you please tell me why?

PostgreSQL ships with a blank tablespace setting, which it interprets as
meaning you want to put the database table files into the default
tablespace which is stored in $PGDATA/base

When you create a new tablespace using CREATE TABLESPACE:
http://www.postgresql.org/docs/current/static/sql-createtablespace.html

Then you'll find that pg_tblspc contains a symbolic link to the new
directory you've told it to use.  At that point, you can then point all
new creation toward that location by setting default_tablespace, or put
individual bits of data onto there with the appropriate options to
CREATE:
http://www.postgresql.org/docs/current/static/manage-ag-tablespaces.html

--
Greg Smith    2ndQuadrant   Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com  www.2ndQuadrant.com


pgsql-general by date:

Previous
From: AI Rumman
Date:
Subject: Re: location for pg_default tablespace
Next
From: "A. Kretschmer"
Date:
Subject: Re: An issue with max() and order by ... limit 1 in postgresql8.3-beta3