Re: Another small bug (pg_autovacuum)

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Another small bug (pg_autovacuum)
Date: 2003-09-12 13:35:11
Message-ID: 200309121335.h8CDZBT09076@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Matthew T. O'Connor wrote:
> On Thu, 2003-09-11 at 18:25, Tom Lane wrote:
> > "Matthew T. O'Connor" <matthew(at)zeut(dot)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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-09-12 13:36:54 Re: [PATCHES] Reorganization of spinlock defines
Previous Message Zeugswetter Andreas SB SD 2003-09-12 13:10:34 Re: [HACKERS] Win32 native port