Re: Strange slow database

From: David Mitchell <david(dot)mitchell(at)telogis(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Strange slow database
Date: 2005-11-18 03:43:55
Message-ID: 437D4DFB.6000408@telogis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> I speculate that you did a VACUUM FULL on it recently.

You speculate right, we do a vacuum full every sunday night as a safety
net. So the vacuum full was a week old.
>
> The condition of the indexes suggests strongly that you've not been
> vacuuming pg_attribute often enough (and perhaps not any of the other
> system catalogs, either?). Heavy use of temp tables will cause
> pg_attribute and pg_class to bloat if you don't keep after them.

That's interesting. We stopped using temporary tables because they were
causing us lots of trouble, including table bloat. We vacuum
pg_attribute (and every other table with an entry in pg_tables) every
ten minutes. What other that temp tables could bloat pg_attribute? We
use refcursors to return data from our stored procedures. We also have a
few stored procedures that return SETOF.

Thanks for helping us out on this.
--
David Mitchell
Software Engineer
Telogis

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-11-18 04:45:07 Re: Trouble with recursive trigger
Previous Message Greg Stark 2005-11-18 03:33:42 Re: Partial foreign keys, check constraints and inheritance