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

From Heikki Linnakangas
Subject Re: autovacuum launcher using InitPostgres
Date
Msg-id 4A9BF369.8030209@enterprisedb.com
Whole thread Raw
In response to Re: autovacuum launcher using InitPostgres  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: autovacuum launcher using InitPostgres  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
>> Tom Lane wrote:
>>> This just seems truly messy :-(.  Let me see if I can find something
>>> cleaner.

I quite like the idea of splitting initialization into two phases, one
that let's you access shared catalogs, and one to bind to a database. I
didn't look into the details, though.

>> I was considering having InitPostgres be an umbrella function, so that
>> extant callers stay as today, but the various underlying pieces are
>> skipped depending on who's calling.  For example I didn't like the bit
>> about starting a transaction or not depending on whether it was the
>> launcher.
> 
> Yeah.  If you have InitPostgres know that much about the AV launcher's
> requirements, it's not clear why it shouldn't just know everything.
> Having it return with the initial transaction still open just seems
> completely horrid.

Yeah, that sounds messy. Can AV launcher simply open a 2nd initial
transaction?


--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

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