Skip site navigation (1) Skip section navigation (2)

Re: pg_autovacuum: short, wide tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: "Matthew T(dot) O'Connor" <matthew(at)zeut(dot)net>,mark reid <mail(at)markreid(dot)org>, pgsql-bugs(at)postgresql(dot)org,Jan Wieck <JanWieck(at)Yahoo(dot)com>
Subject: Re: pg_autovacuum: short, wide tables
Date: 2005-07-08 18:35:14
Message-ID: 26526.1120847714@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> On Fri, Jul 08, 2005 at 01:29:03PM -0400, Tom Lane wrote:
>> The main bit of additional logic that might be needed is an awareness
>> that firing a VACUUM on a main table will implicitly fire one on its
>> toast table, and so you'd not want to go and issue the toast table
>> VACUUM separately.

> I don't see any reason why this wouldn't work.  I even think it'd be
> very easy to implement (from the autovacuum POV -- not sure about the
> stat system).  Furthermore, the awareness you mention is also very easy
> to implement: we just need to make sure the pg_autovacuum tuple for the
> toast table is updated when it is vacuumed, which is just an additional
> function call.

I'm having some second thoughts about allowing VACUUM on a toast table
independently of its parent table --- it's a bit scary to be messing
with the toast table when we have no lock at all on the parent.  It
might work OK, but I'm not sure I want to take the risk.  If we simply
expose toast tables in the stats views, what has to be done to
autovacuum to get it to work properly?  ("Properly" in this case would
mean "fire a VACUUM on the parent table if either it or its toast table
look like they need vacuumed".)  Is this much worse than what you
say above?

> Have you looked at the autovacuum integration patch?

No, but will do.

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Matthew T. O'ConnorDate: 2005-07-08 18:54:57
Subject: Re: pg_autovacuum: short, wide tables
Previous:From: Alvaro HerreraDate: 2005-07-08 18:17:39
Subject: Re: pg_autovacuum: short, wide tables

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group