Re: First steps with 8.3 and autovacuum launcher - Mailing list pgsql-hackers

From Deblauwe Gino
Subject Re: First steps with 8.3 and autovacuum launcher
Date
Msg-id 470F6833.3090908@useitgroup.com
Whole thread Raw
In response to Re: First steps with 8.3 and autovacuum launcher  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
Simon Riggs schreef: <blockquote cite="mid:1192186854.4233.508.camel@ebony.site" type="cite"><pre wrap="">On Fri,
2007-10-12at 11:44 +0200, Michael Paesold wrote: </pre><blockquote type="cite"><pre wrap="">Simon Riggs wrote:
</pre><blockquotetype="cite"><pre wrap="">On Fri, 2007-10-12 at 01:24 -0400, Alvaro Herrera wrote:
</pre><blockquotetype="cite"><pre wrap="">Yes, I think it is easy to mark the "is for xid wraparound" bit in the
 
WorkerInfo struct and have the cancel work only if it's off.

However, what I think should happen is that the signal handler for
SIGINT in a worker for xid wraparound should not cancel the current
vacuum.  Instead turn it into a no-op, if possible.  That way we also
disallow a user from cancelling vacuums for xid wraparound.  I think he
can do that with pg_cancel_backend, and it could be dangerous.       </pre></blockquote><pre wrap="">I think that is
dangeroustoo because the user may have specifically
 
turned AV off. That anti-wraparound vacuum might spring up right in a
busy period and start working its way through many tables, all of which
cause massive writes to occur. That's about as close to us causing an
outage as I ever want to see. We need a way through that to allow the
user to realise his predicament and find a good time to VACUUM. I never
want to say to anybody "nothing you can do, just sit and watch, your
production system will be working again in no time. Restart? no that
won't work either."     </pre></blockquote><pre wrap="">You are probably right that VACUUM going full-steam is a bad
ideain most 
 
situations. Except for anti-wraparound vacuum, cancellation seems the most 
reasonable thing to do. Because autovacuum will usually pickup the table in 
time again.   </pre></blockquote><pre wrap="">
Yeh, if we do have to do the second emergency anti-wraparound, then that
should be at full speed, since there's nothing else to do at that point.
 </pre><blockquote type="cite"><pre wrap="">The only problem I would see is if someone has an application that does a 
lot of schema changes (doesn't sound like a good idea anyway). In that case 
they would better issue manual vacuums on such tables.   </pre></blockquote><pre wrap="">
I can't see a use case for regular DDL as part of an application, on an
otherwise integral table (lots of updates and deletes). </pre></blockquote> As part of an application there's no
use.<br/> As part of an upgrade between 2 different versions of that application there is.<br /> And that's exactly the
kindof situation where temporary disabling autovacuum could become handy.<br /> 

pgsql-hackers by date:

Previous
From: "Heikki Linnakangas"
Date:
Subject: Re: pg_restore oddity?
Next
From: Mario Weilguni
Date:
Subject: Re: pg_restore oddity?