From: | Kevin Grittner <kgrittn(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | dhaval jaiswal <dhavallj(at)hotmail(dot)com>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: pg_class (system) table increasing size. |
Date: | 2016-11-17 22:19:20 |
Message-ID: | CACjxUsMgq=VjU5NBo1oZgSpSSXqqFY2QFdFiV46AhptFrXnHPw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Nov 17, 2016 at 3:16 PM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> Looks like you lost the stat data awhile ago (probably due to a server
> crash, or pg_stats_reset()) and it never got updated. I suggest doing
> "ANALZYE pg_class" to create initial stats; that might prompt autovacuum
> to vacuum the table. If the bloat is excessive, vacuuming might take a
> very long time, in which case perhaps consider VACUUM FULL (but be very
> aware of its consequences first).
>
> I think it's likely that this has happened to other catalogs as well, so
> check the pg_stat_sys_tables view for other entries with all zeroes in
> the n_tup_* columns.
+1
Also, you may want to review your autovacuum settings to make sure
they are aggressive enough. You didn't describe you machine, your
workload, or your vacuum regimen, but if it's a large machine you
would probably need to raise autovacuum_vacuum_cost limit. And if
autovacuum somehow got turned *off* you are likely to have all
kinds of problems with bloat, and may need to schedule some down
time to get it cleaned up.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Rakesh Kumar | 2016-11-18 01:08:37 | pgbench and scaling |
Previous Message | Alvaro Herrera | 2016-11-17 21:16:02 | Re: pg_class (system) table increasing size. |