Re: autovacuum launcher using InitPostgres - Mailing list pgsql-hackers

From Tom Lane
Subject Re: autovacuum launcher using InitPostgres
Date
Msg-id 3032.1251734871@sss.pgh.pa.us
Whole thread Raw
In response to Re: autovacuum launcher using InitPostgres  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: autovacuum launcher using InitPostgres  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> How about this?

I think the accounting for the AV launcher in shmem allocation is a bit
confused yet --- for instance, isn't MaxBackends already including the
launcher?  I wonder if it would be cleaner to include the launcher in
the autovacuum_max_workers parameter, and increase the min/default
values of that by one.

>> While I was looking at this I wondered whether
>> RelationCacheInitializePhase2 really needs to be inside the startup
>> transaction at all.  I think it could probably be moved up before
>> that.  However, if the AV launcher has to do GetTransactionSnapshot
>> then it's not clear that improves matters anyway. 

> Well, the difference is that the initial transaction would be a few
> microsec shorter ... not sure if that matters.

I can't see how it would.  At the point where that runs we'd not be
holding any locks of interest, so there's no concurrency benefit
to be gained.  With this setup it wouldn't make InitPostgres any
cleaner anyway, so I'd leave it alone.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: autovacuum launcher using InitPostgres
Next
From: Tom Lane
Date:
Subject: Re: autovacuum launcher using InitPostgres