pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim C. Nasby <jnasby@pervasive.com>
To: Jeff Frost <jeff@frostconsultingllc.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: strange fsm issues
Date: Tue, 27 Jun 2006 23:45:29 -0500
Message-ID: <20060628044529.GO44573@pervasive.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0606272000440.4350@discord.home.frostconsultingllc.com>
References: <Pine.LNX.4.64.0606210915370.27250@glacier.frostconsultingllc.com>
	<Pine.LNX.4.64.0606211425580.27250@glacier.frostconsultingllc.com>
	<Pine.LNX.4.64.0606220750310.4350@discord.home.frostconsultingllc.com>
	<D9E39C0B-1D32-4BA6-AEAE-1E2D42ABD3F1@pervasive.com>
	<Pine.LNX.4.64.0606221944560.4350@discord.home.frostconsultingllc.com>
	<Pine.LNX.4.64.0606231530500.27250@glacier.frostconsultingllc.com>
	<9F858089-CCD2-4F88-BA18-8738ECEF5246@pervasive.com>
	<Pine.LNX.4.64.0606272000440.4350@discord.home.frostconsultingllc.com>

On Tue, Jun 27, 2006 at 08:02:33PM -0700, Jeff Frost wrote:
> On Tue, 27 Jun 2006, Jim Nasby wrote:
> 
> >>What the heck?  Why would it have shrunk down so much?  The vacuum full 
> >>isn't scheduled until tonight. :-/
> >
> >Take a look at the source for autovacuum... I'm guessing you're right and 
> >that it doesn't make any special considerations for toast tables, which it 
> >probably should (since AFAIK you have to first vacuum the base table, then 
> >commit, then vacuum the toast table).
> >
> >BTW, tracking pg_class.relpages or actual file size over time would 
> >probably be helpful.
> 
> Actually, it says this:
> 
> /*
> * Scan pg_class and determine which tables to vacuum.
> *
> * The stats subsystem collects stats for toast tables independently of
> * the stats for their parent tables.  We need to check those stats since
> * in cases with short, wide tables there might be proportionally much
> * more activity in the toast table than in its parent.
> *
> * Since we can only issue VACUUM against the parent table, we need to
> * transpose a decision to vacuum a toast table into a decision to vacuum
> * its parent.  There's no point in considering ANALYZE on a toast table,
> * either.      To support this, we keep a list of OIDs of toast tables that
> * need vacuuming alongside the list of regular tables.  Regular tables
> * will be entered into the table list even if they appear not to need
> * vacuuming; we go back and re-mark them after finding all the vacuumable
> * toast tables.
> */
> 
> So I guess it does take toast tables into account.

Only if it issues 2 vacuums on the base tables...
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461



view thread (9+ messages)

Message-ID: <20060628044529.GO44573@pervasive.com>
Permalink:  ../20060628044529.GO44573@pervasive.com/
Also on:    postgresql.org/message-id/20060628044529.GO44573@pervasive.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: jnasby@pervasive.com, jeff@frostconsultingllc.com
  Subject: Re: strange fsm issues
  In-Reply-To: <20060628044529.GO44573@pervasive.com>
  References: <Pine.LNX.4.64.0606210915370.27250@glacier.frostconsultingllc.com> <Pine.LNX.4.64.0606211425580.27250@glacier.frostconsultingllc.com> <Pine.LNX.4.64.0606220750310.4350@discord.home.frostconsultingllc.com> <D9E39C0B-1D32-4BA6-AEAE-1E2D42ABD3F1@pervasive.com> <Pine.LNX.4.64.0606221944560.4350@discord.home.frostconsultingllc.com> <Pine.LNX.4.64.0606231530500.27250@glacier.frostconsultingllc.com> <9F858089-CCD2-4F88-BA18-8738ECEF5246@pervasive.com> <Pine.LNX.4.64.0606272000440.4350@discord.home.frostconsultingllc.com> <20060628044529.GO44573@pervasive.com>

* 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