Re: autovacuum launcher using InitPostgres

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: autovacuum launcher using InitPostgres
Date: 2009-08-31 16:07:51
Message-ID: 3032.1251734871@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-08-31 16:15:20 Re: autovacuum launcher using InitPostgres
Previous Message Alvaro Herrera 2009-08-31 16:07:15 Re: autovacuum launcher using InitPostgres