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

moving tablespaces on windows - is it possible?

From: "Kasia Tuszynska" <ktuszynska(at)esri(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: moving tablespaces on windows - is it possible?
Date: 2008-09-08 20:31:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
Hi Everybody,

Is it possible to move the directory associated to a tablespace and
update that information in the postgres cluster?

I was expecting something like : ALTER TABLESPACE LOCATION "C:\..." but
found no such usage.  Looking it up in the documentation I found that on
linux one could

- shutdown postgres instance

- move the directory

- fix the symbolic link in $PGDATA/pg_tblspc

- start postgres instance

- update the pg_tablespace entry


I am running postgres 8.3.0 on windows 2003 sp2, according to wikipedia
windows "symbolic links" have been implemented on xp only, so my
platform would not have them. Altering the pg_tablespace it's self and
moving the directory does not work, I get the following error: could not
create directory "pg_tblspc/16439/111451"; No such file or directory.



1.	is it possible to move a tablespace ?
2.	how does the instance keep track of the pg_tblspc contents if
there are no symbolic links on windows?


Thank you,



In response to

pgsql-admin by date

Next:From: SaiiDate: 2008-09-09 20:49:40
Subject: Source of User Defined functions.
Previous:From: Alejandro D. BurneDate: 2008-09-08 16:04:01
Subject: Re: [GENERAL] secure connections

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