Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

Next:From: Tom LaneDate: 2009-08-31 16:15:20
Subject: Re: autovacuum launcher using InitPostgres
Previous:From: Alvaro HerreraDate: 2009-08-31 16:07:15
Subject: Re: autovacuum launcher using InitPostgres

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group