Re: Symbolic Links to Tablespaces

Поиск
Список
Период
Сортировка
От Campbell, Lance
Тема Re: Symbolic Links to Tablespaces
Дата
Msg-id B10E6810AC2A2F4EA7550D072CDE8760CDDD81@SAB-FENWICK.sab.uiuc.edu
обсуждение исходный текст
Ответ на Re: Symbolic Links to Tablespaces  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Symbolic Links to Tablespaces
Re: Symbolic Links to Tablespaces
Список 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?

Example:
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
command?

Thanks,

Lance Campbell
Project Manager/Software Architect
Web Services at Public Affairs
University of Illinois
217.333.0382
http://webservices.uiuc.edu
My e-mail address has changed to lance@illinois.edu


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

"Campbell, Lance" <lance@illinois.edu> writes:
> I have started to define tablespaces on different disks.  Is there any
> performance issues related to referencing tablespaces on different
disks
> with symbolic links?  By using symbolic links to tablespaces can I
then
> stop the database and move a particular tablespace from one location
to
> 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
http://www.postgresql.org/docs/8.2/static/storage.html

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

            regards, tom lane

В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: I/O on select count(*)
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: Symbolic Links to Tablespaces