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

alter index's tablespace (from default) after pg_upgrade --link

From: MirrorX <mirrorx(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: alter index's tablespace (from default) after pg_upgrade --link
Date: 2012-04-04 11:51:49
Message-ID: 1333540309862-5617549.post@n5.nabble.com (view raw or flat)
Thread:
Lists: pgsql-admin
dear all,

i have come to face the following situation:

-initially the server was 8.4.7
-i used pg_upgrade --link so that the upgrade would be quick
-i created a new tablespace with the intention of moving all the indexes
there (different partition)
-when issueing a statement like 'alter index xxxx set tablespace new_tblsp'
the data files of the index are moved to the new tablespace but the original
files remain also on the data_8.4/base directory

i tried on a test environment to manually delete the datafiles from the old
location and there didn't seem to be any problem from the tests i made (full
scan of the table using the specific index,vacuum etc)...

so my questions are the following:
1)is this the expected behavior when altering an index whose data files come
from a link on pg_upgrade?
2)if so, is it safe to manually 'delete' the old datafiles?
3)is there any other way of doing this procedure?i am in the process of
trying to drop the old index to check if the space will be released. if so,
i guess i could create it directly onto the new tablespace

thx in advance for your insight




--
View this message in context: http://postgresql.1045698.n5.nabble.com/alter-index-s-tablespace-from-default-after-pg-upgrade-link-tp5617549p5617549.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.

pgsql-admin by date

Next:From: Bèrto ëd SèraDate: 2012-04-04 13:12:35
Subject: Re: check_postgresql.pl for zabbix
Previous:From: Matheus de OliveiraDate: 2012-04-04 11:24:40
Subject: Re: check_postgresql.pl for zabbix

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