Re: fork/exec

Поиск
Список
Период
Сортировка
От Claudio Natoli
Тема Re: fork/exec
Дата
Msg-id A02DEC4D1073D611BAE8525405FCCE2B55F2B7@harris.memetrics.local
обсуждение исходный текст
Ответ на fork/exec  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: fork/exec  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> What does SSDataBaseInit have to do with acquiring configuration
> parameters?  (Answer: nothing.)  Why is it being called here at all,
> and why only in the EXEC_BACKEND case?  Sure can't figure 
> that out from
> the uncommented code.  Is it a good idea to do it?  I rather doubt it
> --- that routine does on_exit_reset, which would lose any previously
> registered exit callbacks, which is something that should only happen
> immediately after fork(), not as far down in BootstrapMain as this is
> being done.

That is a remaining wart. Having fixed a similar pattern in the backend
creation, I asked whether or not fixing the Bootstrap process creation was
overkill, and took no answer to be in the affirmative...


> But Andrew's complaint already had some merit even before this work
> started.  We probably ought to rear back and contemplate the overall
> structure of postmaster.c and postgres.c, and see what we can 
> do to make it more comprehensible.  I don't have any immediate thoughts 
> about what to do, just a bee in my bonnet that it needs to be done.  Any
ideas?

If you like, I'll quickly provide a reversion of the BackendRun/Init split,
and perhaps implement a "SubBootstrapMain"-ism... but this doesn't really
help things overall. Is it at least a better point to start from?

Cheers,
Claudio

--- 
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see 
<a
href="http://www.memetrics.com/emailpolicy.html">http://www.memetrics.com/em
ailpolicy.html</a>


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: fork/exec
Следующее
От: "Nicolai Tufar"
Дата:
Сообщение: Q: How ORDER BY is being done inetrnally?