Re: Another small bug (pg_autovacuum) - Mailing list pgsql-hackers

From Matthew T. O'Connor
Subject Re: Another small bug (pg_autovacuum)
Date
Msg-id 1063384012.15645.17.camel@zeutrh9
Whole thread Raw
In response to Re: Another small bug (pg_autovacuum)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Another small bug (pg_autovacuum)
Re: Another small bug (pg_autovacuum)
List pgsql-hackers
On Fri, 2003-09-12 at 09:35, Bruce Momjian wrote:
> Matthew T. O'Connor wrote:
> > 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.

OK, well as we wait on the fix for the stats system, let me submit my
patch for pg_autovacuum.  This patch assumes that the stats system will
be fixed so that all inserts, updates and deletes performed on shared
tables reguardless of what database those commands were executed from,
will show up in the stats shown in each database.

Even if this the stats system isn't fixed, this patch still is much
better about monitoring system tables that aren't shared, so it's an
improvement no matter what.

Matthew T. O'Connor



Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: __cpu__ defines
Next
From: Bruce Momjian
Date:
Subject: Re: __cpu__ defines