VACUUM FULL into another tablespace?

Поиск
Список
Период
Сортировка
От Michael Kussmaul
Тема VACUUM FULL into another tablespace?
Дата
Msg-id 762524C5-AC0B-48C5-897E-6313C1ABC52E@nix.ch
обсуждение исходный текст
Список pgsql-admin
I have a very large table on my PostgreSQL 9.1 database (openstreetmap data: 64GB data + 100GB indexes in one
particulartable) stored on a dedicated 220GB SSD-disk (tablespace "SSD"). I would like to run "VACUUM (FULL, FREEZE,
ANALYZE)"on that table to reclaim some tablespace. But as you can see, such an operation fails, because rebuilding that
tabletakes an additional 160GB of data - the SSD is just too small for that. 

What I did in the past, was changing the tablespace of that huge table to my normal disk (4TB, tablespace "DEFAULT"),
runVACUUM there, then changing back the tablespace to "SSD". This just takes a very long time, because all the heavy
re-indexingnow takes place on my very slow normal disk. 

I was wondering if there is a way to directly "VACUUM + alter the table space" in one operation? So basically, the db
wouldread the table on "SSD" and places the resulting vacuumed table on tablespace "DEFAULT". 

Looking at the vacuum man-page this seems not possible - but perhaps I'm missing something or there exists some
workaroundsto achieve something similar (reclaiming space)? 

kind regards
Michael

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

Предыдущее
От: Scott Ribe
Дата:
Сообщение: Re: postgres user with automate rsync and private/public key pairs
Следующее
От: Andreas
Дата:
Сообщение: Can't increase shared_buffers for PostgreSQL on openSUSE 12.3