Re: HowTo move indices' files to other hdd ?

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: HowTo move indices' files to other hdd ?
Дата
Msg-id Pine.LNX.4.44.0207151402080.29139-100000@css120.ihs.com
обсуждение исходный текст
Ответ на HowTo move indices' files to other hdd ?  (Vitaliy Pylypiv <pylypiv@hotbox.ru>)
Список pgsql-general
On Mon, 15 Jul 2002, Vitaliy Pylypiv wrote:

> Hi all!
>
> Is it possible to move  indices' files to other hdd ?

Yes.  Here's what you need to do:

first, go to the postgresql-7.x.x/contrib/oid2name directory (as root) and
do a make;make install so you have the oid2name utility installed.

then, do:

oid2name | grep dbname

where dbname is the name of the database you want to move an index around
on.  You should get a line like 10964230 = dbname back..

As the postgres superuser, do:

cd $PGDATA/base/oidfromoid2nameabove  (i.e. 10964230 in my example)

Next do:

oid2name -d dbname|grep indexname

to get the oid of the index.

Then, shutdown the server and cp your index elsewhere:

pg_ctl stop
cp 10965165 /mnt/indexdisk/10965165
rm 10965165
ln -s /mnt/indexdisk/10965165
pg_ctl start

And that's that.


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

Предыдущее
От: nconway@klamath.dyndns.org (Neil Conway)
Дата:
Сообщение: Re: Question: merit / feasibility of compressing frontend <--> backend transfers w/ zlib
Следующее
От: Robert Treat
Дата:
Сообщение: table size growing out of control