Re: Strange slow database - Mailing list pgsql-general

From David Mitchell
Subject Re: Strange slow database
Date
Msg-id 437D4DFB.6000408@telogis.com
Whole thread Raw
In response to Re: Strange slow database  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-general by date:

Previous
From: Christopher Browne
Date:
Subject: Re: Rebranding PostgreSQL
Next
From: Tom Lane
Date:
Subject: Re: Trouble with recursive trigger