Using symbolic links with tablespaces

Поиск
Список
Период
Сортировка
От miller_2555
Тема Using symbolic links with tablespaces
Дата
Msg-id 25353894.post@talk.nabble.com
обсуждение исходный текст
Ответы Re: Using symbolic links with tablespaces  (miller_2555 <nabble.30.miller_2555@spamgourmet.com>)
Список pgsql-general
Hi -
    I have a database and used symbolic links in the tablespace definitions.
I just wanted to validate that I can move the database objects to a
different physical volume by the following:
     1) issuing `pg_ctl stop`
     2) hard copying the tablespace files from one drive to another
     3) pointing the symbolic links to the new drive
     4) issuing `pg_ctl start`

A semi-complete example is as follows:

#> mount /dev/snn1 /mnt/myolddrive
#> mount /dev/sno1 /mnt/mynewdrive
#> cd /mnt
#> ln -s /mnt/myolddrive mypsqllink
#> pg_ctl start
#> psql mydb -c 'CREATE TABLESPACE "mytablespacename" OWNER wtadmin LOCATION
''/mnt/mypsqllink'';'
#> psql mydb -c 'CREATE TABLE "mytable" ("mycol" int) TABLESPACE
"mytablespacename";'
#> pg_ctl stop
#> cp -r ./myolddrive ./mynewdrive
#> rm mypsqllink
#> ln -s /mnt/mynewdrive mypsqllink
#> pg_ctl start

I would think this is okay, but want to double-check before running...

Thanks!

BTW -
Linux 2.6.27.29-170.2.78.fc10.x86_64 #1 SMP Fri Jul 31 04:16:20 EDT 2009
x86_64 GNU/Linux
psql (PostgreSQL) 8.3.7
--
View this message in context: http://www.nabble.com/Using-symbolic-links-with-tablespaces-tp25353894p25353894.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: PG connections going to 'waiting'
Следующее
От: Richard Broersma
Дата:
Сообщение: Transaction Strategies for Natural Primary Keys & Cascading Updates