Thread: How to check tablespace

How to check tablespace

From
Low Kian Seong
Date:
dear people,

Let's say i am using a database in a postgresql
system, how do i check the location of the tablespace
where it is kept in the filesystem ?

thanks in advanced.



__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/

Re: How to check tablespace

From
Tom Lane
Date:
Low Kian Seong <postgresql_low@yahoo.com> writes:
> ... how do i check the location of the tablespace
> where it is kept in the filesystem ?

Look into the pg_tablespace catalog.

            regards, tom lane

Re: How to check tablespace

From
Low Kian Seong
Date:
when i do a 'SELECT * FROM pg_tablespace', i see this
:

  spcname   | spcowner |       spclocation
|spcacl
------------+----------+-------------------------+--------
 pg_default |        1 |                         |
 pg_global  |        1 |                         |
 dbspace    |        1 | /usr/local/pgsql/pgsql2 |


but how do i ascertain which spcname it's kept in ?

thanks.


--- Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Low Kian Seong <postgresql_low@yahoo.com> writes:
> > ... how do i check the location of the tablespace
> > where it is kept in the filesystem ?
>
> Look into the pg_tablespace catalog.
>
>             regards, tom lane
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>



__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail