Matthew T. O'Connor wrote:
> On Thu, 2003-09-11 at 18:25, Tom Lane wrote:
> > "Matthew T. O'Connor" <matthew@zeut.net> writes:
> > > hrm.... OK. Patch forthcoming....
> >
> > BTW, I am not sure it is a good idea to suppress "redundant" vacuuming
> > of shared tables in the first place. The trouble with doing so is that
> > if you only vacuum pg_shadow through template1, then only template1 will
> > ever have up-to-date statistics about it. That's not good.
> >
> > You might be able to get away with doing actual vacuums only through
> > template1, and doing just ANALYZEs every so often in other DBs.
>
> I made a patch to fix this, but in testing it I noticed that the stats
> system doesn't work on shared tables as I was expecting it too (as my
> latest patch requires it too :-). It treats instances of shared tables
> in separate databases as totally unique tables. This makes it hard to
> know how much activity has really gone on for a shared table.
>
> Is the behavior of the following example expected / desired?
I suspect is just a bug because no one noticed it before. As I
understand it, the stats system is recorded per-database. We could add
stuff so the global tables are only recorded in template1 or perhaps
record in template1 but report template1's numbers for all databases.
-- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610)
359-1001+ If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square,
Pennsylvania19073