Search Postgresql Archives

Using symbolic links with tablespaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux