Re: [GENERAL] tool for incrementally shrinking bloated tables

2004-12-22 Thread Martijn van Oosterhout
I like the idea generally, just some comments: On Tue, Dec 21, 2004 at 07:09:39PM -0500, Paul Tillotson wrote: > (1) VACUUM KEEP_EARLY_FREE_PAGES mybloatedtable; -- item (a) This may not be necessary anyway, but could improve performance. > (2) UPDATE mybloatedtable SET foo = foo WHERE ctid > '(

Re: [GENERAL] tool for incrementally shrinking bloated tables

2004-12-21 Thread Jim C. Nasby
On Tue, Dec 21, 2004 at 07:09:39PM -0500, Paul Tillotson wrote: > To use this system one would do this: > > (1) VACUUM KEEP_EARLY_FREE_PAGES mybloatedtable; -- item (a) > > (2) UPDATE mybloatedtable SET foo = foo WHERE ctid > '(n, 0)'; > --move tuples in end of the table to the front. > > (3

[GENERAL] tool for incrementally shrinking bloated tables

2004-12-21 Thread Paul Tillotson
(Originally posted on -hackers, but they were too busy or not interested.) I am thinking about attempting to code this if it is not too difficult for a newbie, but I wanted to see if anyone has any input or ideas first. Goal: on a prduction server, to gradually shrink a table (no matter how large