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 18:07:52
Message-ID: 19250.1251742072@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:
> Tom Lane wrote:
>> 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.

Actually, there is a better way to do this: if we move up the
RelationCacheInitializePhase2 call, then we can have the AV launcher
case just fall out *before* the transaction start. It can do
GetTransactionSnapshot inside its own transaction that reads
pg_database. This is a better solution because it'll have a more
up-to-date version of RecentGlobalXmin while scanning pg_database.
(Indeed, I think this might be *necessary* over the very long haul.)

I think I've got the signal handling cleaned up, but need to test.
Is there any really good reason why autovacuum has its own avl_quickdie
instead of using quickdie() for SIGQUIT?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-08-31 18:12:43 Re: 8.5 release timetable, again
Previous Message Bruce Momjian 2009-08-31 17:59:53 Re: 8.5 release timetable, again