pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
auto vacuum settings
5+ messages / 3 participants
[nested] [flat]

* auto vacuum settings
@ 2005-08-31 05:33 Jeff Frost <jeff@frostconsultingllc.com>
  2005-08-31 13:47 ` Re: auto vacuum settings Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 5+ messages in thread

From: Jeff Frost @ 2005-08-31 05:33 UTC (permalink / raw)
  To: pgsql-admin

Since we're on the vacuum kick these days, what's the best way to tell if my 
autovacuum settings are working well?  I'm sure I can query some info out of 
the pg_stats tables, no?

Also, if using autovacuum, should I still do a vacuum full on a regular 
basis?

-- 
Jeff Frost, Owner 	<jeff@frostconsultingllc.com>
Frost Consulting, LLC 	http://www.frostconsultingllc.com/
Phone: 650-780-7908	FAX: 650-649-1954



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: auto vacuum settings
  2005-08-31 05:33 auto vacuum settings Jeff Frost <jeff@frostconsultingllc.com>
@ 2005-08-31 13:47 ` Tom Lane <tgl@sss.pgh.pa.us>
  2005-08-31 14:40   ` Re: auto vacuum settings Alvaro Herrera <alvherre@alvh.no-ip.org>
  2005-08-31 17:59   ` Re: auto vacuum settings Jeff Frost <jeff@frostconsultingllc.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Tom Lane @ 2005-08-31 13:47 UTC (permalink / raw)
  To: Jeff Frost <jeff@frostconsultingllc.com>; +Cc: pgsql-admin

Jeff Frost <jeff@frostconsultingllc.com> writes:
> Since we're on the vacuum kick these days, what's the best way to tell if my 
> autovacuum settings are working well?  I'm sure I can query some info out of 
> the pg_stats tables, no?

If the database isn't bloating (ie, physical storage growing faster than
valid data volume) then it's getting the job done.  Keep an eye on
"du $PGDATA" or pg_class.relpages entries.

> Also, if using autovacuum, should I still do a vacuum full on a regular 
> basis?

No.  Needing to do a VACUUM FULL would be prima facie evidence that
autovacuum *isn't* getting its job done.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: auto vacuum settings
  2005-08-31 05:33 auto vacuum settings Jeff Frost <jeff@frostconsultingllc.com>
  2005-08-31 13:47 ` Re: auto vacuum settings Tom Lane <tgl@sss.pgh.pa.us>
@ 2005-08-31 14:40   ` Alvaro Herrera <alvherre@alvh.no-ip.org>
  1 sibling, 0 replies; 5+ messages in thread

From: Alvaro Herrera @ 2005-08-31 14:40 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Jeff Frost <jeff@frostconsultingllc.com>; pgsql-admin

On Wed, Aug 31, 2005 at 09:47:35AM -0400, Tom Lane wrote:
> Jeff Frost <jeff@frostconsultingllc.com> writes:
> > Since we're on the vacuum kick these days, what's the best way to tell if my 
> > autovacuum settings are working well?  I'm sure I can query some info out of 
> > the pg_stats tables, no?
> 
> If the database isn't bloating (ie, physical storage growing faster than
> valid data volume) then it's getting the job done.  Keep an eye on
> "du $PGDATA" or pg_class.relpages entries.

Another test may be checking table stats with pgstattuple.  If the
percentage of dead rows grows as time passes, you have a problem.

-- 
Alvaro Herrera <alvherre[]alvh.no-ip.org>      Architect, www.EnterpriseDB.com
"Puedes vivir solo una vez, pero si lo haces bien, una vez es suficiente"



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: auto vacuum settings
  2005-08-31 05:33 auto vacuum settings Jeff Frost <jeff@frostconsultingllc.com>
  2005-08-31 13:47 ` Re: auto vacuum settings Tom Lane <tgl@sss.pgh.pa.us>
@ 2005-08-31 17:59   ` Jeff Frost <jeff@frostconsultingllc.com>
  2005-08-31 18:07     ` Re: auto vacuum settings Alvaro Herrera <alvherre@alvh.no-ip.org>
  1 sibling, 1 reply; 5+ messages in thread

From: Jeff Frost @ 2005-08-31 17:59 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin

Thanks Tom!

Now what does the relpages column mean?  I.e. how should I interpret that 
entry for my tables?

On Wed, 31 Aug 2005, Tom Lane wrote:

> If the database isn't bloating (ie, physical storage growing faster than
> valid data volume) then it's getting the job done.  Keep an eye on
> "du $PGDATA" or pg_class.relpages entries.

-- 
Jeff Frost, Owner 	<jeff@frostconsultingllc.com>
Frost Consulting, LLC 	http://www.frostconsultingllc.com/
Phone: 650-780-7908	FAX: 650-649-1954



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: auto vacuum settings
  2005-08-31 05:33 auto vacuum settings Jeff Frost <jeff@frostconsultingllc.com>
  2005-08-31 13:47 ` Re: auto vacuum settings Tom Lane <tgl@sss.pgh.pa.us>
  2005-08-31 17:59   ` Re: auto vacuum settings Jeff Frost <jeff@frostconsultingllc.com>
@ 2005-08-31 18:07     ` Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 5+ messages in thread

From: Alvaro Herrera @ 2005-08-31 18:07 UTC (permalink / raw)
  To: Jeff Frost <jeff@frostconsultingllc.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-admin

On Wed, Aug 31, 2005 at 10:59:49AM -0700, Jeff Frost wrote:
> Thanks Tom!
> 
> Now what does the relpages column mean?  I.e. how should I interpret that 
> entry for my tables?

relpages is the number of "pages" of the table.  A page is 8kb (unless
you changed a compile-time setting -- you can check it with SHOW
block_size).

Each page stores whole tuples, and can have some amount of free space.
Tuples exceeding a certain length will be "toasted", that is, some of
its attributes will be moved to an external table.  Check the
documentation for more details -- there is a section called "Disk
Storage" or something similar.

-- 
Alvaro Herrera -- Valdivia, Chile         Architect, www.EnterpriseDB.com
"[PostgreSQL] is a great group; in my opinion it is THE best open source
development communities in existence anywhere."                (Lamar Owen)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2005-08-31 18:07 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-08-31 05:33 auto vacuum settings Jeff Frost <jeff@frostconsultingllc.com>
2005-08-31 13:47 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-08-31 14:40   ` Alvaro Herrera <alvherre@alvh.no-ip.org>
2005-08-31 17:59   ` Jeff Frost <jeff@frostconsultingllc.com>
2005-08-31 18:07     ` Alvaro Herrera <alvherre@alvh.no-ip.org>

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