pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matthew T. O'Connor <matthew@zeut.net>
To: Mindaugas Riauba <mind@bi.lt>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: How to avoid database bloat
Date: Fri, 03 Jun 2005 12:43:06 -0400
Message-ID: <42A0889A.2050200@zeut.net> (raw)
In-Reply-To: <010701c56817$fd543d20$f20214ac@bite.lt>
References: <00d501c5667d$8cc12320$f20214ac@bite.lt>
	<13878.1117636799@sss.pgh.pa.us>
	<018601c56744$9d5aae50$f20214ac@bite.lt>
	<13178.1117719939@sss.pgh.pa.us>
	<02db01c5677e$d43d3b10$f20214ac@bite.lt>
	<429F2F73.8050406@zeut.net>
	<010701c56817$fd543d20$f20214ac@bite.lt>

Mindaugas Riauba wrote:

>>Might e aggressive enough, but might not.  I have seen some people run
>>-V 0.1.  Also you probably don't need -A that low.  This could an issue
>>where analyze results in an inaccurate reltuples value which is
>>preventing autovacuum from doing it's job.  Could you please run it with
>>-d 2 and show us the relevant log output.
>>    
>>
>
>  Relevant parts are below. And we had to set so aggressive analyze because
>otherwise planer statistics were getting old too fast. As I said table has
>very
>high turnover most of the records live here only for a few seconds.
>  
>

Looked like pg_autovacuum is operating as expected.  One of the annoying 
limitations of pg_autovacuum in current releases is that you can't set 
thresholds on a per table basis.  It looks like this table might require 
an even more aggressive vacuum threshold.  Couple of thoughts, are you 
sure it's the table that is growing and not the indexes? (assuming this 
table has indexes on it). 

>  And one more question - anyway why table keeps growing? It is shown that
>it occupies
><10000 pages and max_fsm_pages = 200000 so vacuum should keep up with the
>changes?
>Or is it too low according to pg_class system table? What should be the
>reasonable value?
>  
>

Does the table keep growing?  Or does it grow to a point an then stop 
growing?  It's normal for a table to operate at a steady state size that 
is bigger that it's fresly "vacuum full"'d size.  And with -V set at 0.5 
it should be at a minimum 50% larger than it's minimum size.  Your email 
before said that this table went from 20M to 70M but does it keep 
going?  Perhaps it would start leveling off at this point, or some point 
shortly there-after.

Anyway, I'm not sure if there is something else going on here, but from 
the log it looks as though pg_autovacuum is working as advertised. 




view thread (12+ messages)  latest in thread

Message-ID: <42A0889A.2050200@zeut.net>
Permalink:  ../42A0889A.2050200@zeut.net/
Also on:    postgresql.org/message-id/42A0889A.2050200@zeut.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: matthew@zeut.net, mind@bi.lt, tgl@sss.pgh.pa.us
  Subject: Re: How to avoid database bloat
  In-Reply-To: <42A0889A.2050200@zeut.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox