Robert Treat <[EMAIL PROTECTED]> writes:
> I'm looking at a postgresql 7.3 database that has gotten rather bloated
> in pg_statistic:
> I am trying to figure out a way to shrink this down to something more
> reasonable, with the caveat of not restarting the database server.

You haven't got too many options in 7.3, but it might work reasonably
well to do
        delete from pg_statistic;
        vacuum full pg_statistic;
        re-analyze to repopulate
vacuum full with no records should take well under a minute.  It won't
shrink the index, but it'll fix the table bloat which seems the worst
part.

The main gotcha here is that any queries started before you can finish
the re-analyze will not have the benefit of statistics; in the worst
case they might choose bad enough plans that you'll wish you had not
done it.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to