Re: postmaster(s) have high load average - Mailing list pgsql-general

From Christopher Browne
Subject Re: postmaster(s) have high load average
Date
Msg-id m3k79m718c.fsf@chvatal.cbbrowne.com
Whole thread Raw
In response to postmaster(s) have high load average  (Chris Webster <cjw@ucar.edu>)
Responses Re: postmaster(s) have high load average  ("Matthew T. O'Connor" <matthew@zeut.net>)
List pgsql-general
In an attempt to throw the authorities off his trail, clapidus@hotmail.com ("Claudio Lapidus") transmitted:
>> Run VACUUM VERBOSE on it; you'll no doubt see that some internal
>> tables such as pg_activity, pg_statistic, and such have a lot of dead
>> tuples.  Establishing a connection leads to _some_ DB activity, and
>> probably a dead tuple or two; every time you ANALYZE, you create a
>> bunch of dead tuples since old statistics are "killed off."
>
> What? Does this mean that it is needed to routinely vacuum system tables
> too? If so, which is the recommended procedure?

On some 7.2 systems I work with, a smattering of system tables are
vacuumed hourly along with applications that are known to be good
"fodder" for the purpose.

In 7.3 and 7.4, the "contrib" application, pg_autovacuum can do the
trick, vacuuming anything that reaches thresholds of
inserts/deletes/updates, and do so more or less as often as necessary.

If you haven't got a cron job looking something like:

   0 0 * * * * vacuumdb -a -z > /dev/null 2> /dev/null

then you should probably add that, at least.
--
wm(X,Y):-write(X),write('@'),write(Y). wm('aa454','freenet.carleton.ca').
http://cbbrowne.com/info/multiplexor.html
"A   hack  is a   terrible   thing  to  waste,    please  give to  the
implementation of your choice..." -- GJC

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Continued mail server problems for all PGSQL mailing
Next
From: Karsten Hilbert
Date:
Subject: dumbheaded SQL question (probably join or subselect) - longish