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 20071001205007.GI20792@alvh.no-ip.org
Whole thread Raw
In response to Re: First steps with 8.3 and autovacuum launcher  ("Matthew T. O'Connor" <matthew@zeut.net>)
Responses Re: First steps with 8.3 and autovacuum launcher
List pgsql-hackers
Matthew T. O'Connor escribió:
> Tom Lane wrote:
>> Alvaro Herrera <alvherre@commandprompt.com> writes:
>>   
>>> This is an interesting idea, but I think it's attacking the wrong
>>> problem.  To me, the problem here is that an ANALYZE should not block
>>> CREATE INDEX or certain forms of ALTER TABLE.
>>
>> I doubt that that will work; in particular I'm pretty dubious that you
>> can safely make CREATE INDEX and VACUUM run together.  Since they'd be
>> unlikely to be using the identical OldestXmin horizon, you'd likely end
>> up with dangling index entries (ie, CREATE INDEX indexes a tuple that
>> the VACUUM removes shortly afterward).
>
> I think the main issue is ANALYZE not VACUUM (at least in this thread) 
> since it's DB load times that are in question.

Right.  Autovac will not issue VACUUM against the freshly restored
tables anyway, since there are no deleted tuples.

> Can CREATE INDEX and ANALYZE be made to run concurrently?

I don't see why not (except for the fact that both try to update
reltuples and relpages AFAIR, so we would need to be careful about
that).

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


pgsql-hackers by date:

Previous
From: "Matthew T. O'Connor"
Date:
Subject: Re: First steps with 8.3 and autovacuum launcher
Next
From: Simon Riggs
Date:
Subject: Re: First steps with 8.3 and autovacuum launcher