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

From Alvaro Herrera
Subject Re: First steps with 8.3 and autovacuum launcher
Date
Msg-id 20071012052429.GA12750@alvh.no-ip.org
Whole thread Raw
In response to Re: First steps with 8.3 and autovacuum launcher  (Michael Paesold <mpaesold@gmx.at>)
Responses Re: First steps with 8.3 and autovacuum launcher
List pgsql-hackers
Michael Paesold escribió:
> Simon Riggs wrote:

> Hmm, I am not sure we are there, yet. Autovacuum does take extra care to 
> vacuum tables nearing xid wrap-around, right? It even does so when 
> autovacuum is disabled in the configuration.
>
> So in case a vacuum is needed for that very reason, the vacuum should *not* 
> be canceled, of course. So we don't really need the information, whether 
> the AV worker is doing VACUUM or ANALYZE, but whether it is critical 
> against xid wrap-around. Could that be done as easily as in Alvaro's patch 
> for distinguishing vacuum/analyze? Alvaro?

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.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Release notes introductory text
Next
From: Simon Riggs
Date:
Subject: Re: First steps with 8.3 and autovacuum launcher