Re: remove flatfiles.c

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: remove flatfiles.c
Дата
Msg-id 20090902012933.GC7243@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: remove flatfiles.c  (Ron Mayer <rm_pg@cheapcomplexdevices.com>)
Ответы Re: remove flatfiles.c  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Ron Mayer wrote:
> Greg Stark wrote:
> > 
> > That's what I want to believe. But picture if you have, say a
> > 1-terabyte table which is 50% dead tuples and you don't have a spare
> > 1-terabytes to rewrite the whole table.
> 
> Could one hypothetically do
>    update bigtable set pk = pk where ctid in (select ctid from bigtable order by ctid desc limit 100);
>    vacuum;
> and repeat until max(ctid) is small enough?

I remember Hannu Krosing said they used something like that to shrink
really bloated tables.  Maybe we should try to explicitely support a
mechanism that worked in that fashion.  I think I tried it at some point
and found that the problem with it was that ctid was too limited in what
it was able to do.

The neat thing is that now that we have the visibility fork, each vacuum
needn't scan the whole table each time.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


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

Предыдущее
От: Gokulakannan Somasundaram
Дата:
Сообщение: A bug in scan.l
Следующее
От: Tom Lane
Дата:
Сообщение: Re: make installcheck is broken in HEAD on mingw