From: | AI Rumman <rummandba(at)gmail(dot)com> |
---|---|
To: | Greg Smith <greg(at)2ndquadrant(dot)com> |
Cc: | John R Pierce <pierce(at)hogranch(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: location for pg_default tablespace |
Date: | 2010-01-12 06:14:42 |
Message-ID: | 2a7905441001112214r42cdd222vccc986818e79c0f5@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I used the followings:
create tablespace mytabspc location '/var/lib/pgsql/data/pg_tblspc';
create database mydb with tablespace=mytabspc;
drop database mydb;
drop tablespace mytabspc;
ERROR: tablspace 'mytabspc' is not empty
Please tell me why?
On Tue, Jan 12, 2010 at 11:50 AM, Greg Smith <greg(at)2ndquadrant(dot)com> wrote:
> 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(at)2ndQuadrant(dot)com www.2ndQuadrant.com <http://www.2ndquadrant.com/>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Smith | 2010-01-12 06:17:26 | Re: location for pg_default tablespace |
Previous Message | A. Kretschmer | 2010-01-12 05:55:36 | Re: An issue with max() and order by ... limit 1 in postgresql8.3-beta3 |