Re: Excessive growth of pg_attribute and other system tables

From: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>
To: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Excessive growth of pg_attribute and other system tables
Date: 2005-03-21 18:52:07
Message-ID: 423F17D7.7040904@zeut.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-hackers

Steve Crawford wrote:

>On Thursday 17 March 2005 3:15 pm, Steve Crawford wrote:
>
>
>>I'm having trouble with physical growth of postgresql system
>>tables....
>>
>>
>
>Additional info. The most recent autovacuum entries for the
>pg_attribute table are:
>
>[2005...] Performing: VACUUM ANALYZE "pg_catalog"."pg_attribute"
>[2005...] table name: tati."pg_catalog"."pg_attribute"
>[2005...] relid: 1249; relisshared: 0
>[2005...] reltuples: 9334.000000; relpages: 82282
>[2005...] curr_analyze_count: 6647115; curr_vacuum_count: 861454
>[2005...] last_analyze_count: 6647115; last_vacuum_count: 861454
>[2005...] analyze_threshold: 9834; vacuum_threshold: 19668
>
>and
>
>[2005...] Performing: ANALYZE "pg_catalog"."pg_attribute"
>[2005...] table name: foo."pg_catalog"."pg_attribute"
>[2005...] relid: 1249; relisshared: 0
>[2005...] reltuples: 4843240.000000; relpages: 82284
>[2005...] curr_analyze_count: 6657041; curr_vacuum_count: 862897
>[2005...] last_analyze_count: 6657041; last_vacuum_count: 861454
>[2005...] analyze_threshold: 4843740; vacuum_threshold: 19668
>
>(Both within past 1 day - dates truncated to avoid line-wrap.) The
>table currently has just over 9,000 tuples and I have no reason to
>believe that should have changed substantially. The thresholds and
>counts seem way off - especially in the second pass.
>
>

I believe this discrepancy has to do with the fact that ANALYZE can
return some very bogus values for reltuples, where as vacuum always
returns an accurate count. I'm not sure how to best handle this.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Matthew T. O'Connor 2005-03-21 19:06:54 Re: Excessive growth of pg_attribute and other system tables
Previous Message Michael 2005-03-21 17:56:37 Re: pg_dump problem.

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2005-03-21 18:58:57 Re: Very strange query difference between 7.3.6 and 7.4.6
Previous Message Tom Lane 2005-03-21 15:29:30 Re: Prevent conflicting SET options from being set