Skip site navigation (1) Skip section navigation (2)

Re: Symbolic Links to Tablespaces

From: "Campbell, Lance" <lance(at)illinois(dot)edu>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Symbolic Links to Tablespaces
Date: 2008-05-26 17:10:07
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Once I have assigned tables and indexes to a particular tablespace that
points to a particular location on disk is there a simple way to move
the files to a new location?

Table xyz is using tablespace xyz_tbl which is located at
/somedir/xyz_tbl on the disk.  If I want to move it to a new disk
located at /someotherdir/xyz_tbl/ how can I do that easily?  

Do I have to backup all of the tables using the tablespace xyz_tbl, drop
the tables, drop the tablespace, recreate the tablespace with a
different disk location and then finally reload the tables and data?  Or
is there an easier way?  Is there a move tablespace disk location


Lance Campbell
Project Manager/Software Architect
Web Services at Public Affairs
University of Illinois
My e-mail address has changed to lance(at)illinois(dot)edu

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us] 
Sent: Monday, May 26, 2008 10:09 AM
To: Campbell, Lance
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: [PERFORM] Symbolic Links to Tablespaces 

"Campbell, Lance" <lance(at)illinois(dot)edu> writes:
> I have started to define tablespaces on different disks.  Is there any
> performance issues related to referencing tablespaces on different
> with symbolic links?  By using symbolic links to tablespaces can I
> stop the database and move a particular tablespace from one location
> another without causing a problem?  This would seem to give a lot of
> flexibility to the location of tablespaces.  

A tablespace already is a symbolic link --- read

Putting another one into the path will eat cycles and doesn't seem like
it could buy anything.

			regards, tom lane

In response to


pgsql-performance by date

Next:From: A. KretschmerDate: 2008-05-26 17:32:12
Subject: Re: Symbolic Links to Tablespaces
Previous:From: Tom LaneDate: 2008-05-26 15:36:57
Subject: Re: I/O on select count(*)

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group