"Matthew T. O'Connor" <matthew@zeut.net> writes:
> So we would have a problem if commands that effect these tables are done
> from lots of different databases. In reality, I don't think these
> tables change that much (pg_database, pg_shadow, and pg_group), and most
> of commands that do effect these tables are usually done from template1.
I agree that there is probably not a large problem here. I just wanted
to be sure that pg_autovacuum wouldn't go nuts if we can't fix pgstats
for 7.4.
> I can hardwire in something to hedge this off like setting the threshold
> for shared tables much much lower than normal thresholds. I could also
> do something more complicated and try to aggregate all the activity seen
> by all the databases and when the sum exceeds the threshold then have
> then perform a vacuum from template1 and analyze from all other
> databases.
That seems like more work than it's worth for a short-term stopgap.
If Jan concludes that fixing pgstats is *really* hard and will not
happen for awhile, then we could talk about more extensive workarounds
in pg_autovacuum, but right now I doubt it's needed.
regards, tom lane