On Mon, 2009-10-19 at 11:35 -0700, Christophe Pettus wrote:
> On Oct 19, 2009, at 11:26 AM, Scott Marlowe wrote:
> > That could be a pretty bad worst case scenario for certain types of
> > tables / usage patterns.
>
> Given that (presumably) the database server is not failing repeatedly
> without some kind of operator notification, isn't it at least somewhat
> reasonable to just make "start an vacuum upon recovery from an
> immediate shutdown" an operational procedure, rather than something PG
> does automatically?
>
It's not a vacuum you want, it's an analyze. Once the stats are back,
autovacuum will vacuum accordingly.
autoanalyze will automatically analyze new tables when they don't have
stats. It seems logical that it should handle this case where the table
also does not have stats.
--
Brad Nicholson 416-673-4106
Database Administrator, Afilias Canada Corp.