Re: fork/exec

From: Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>
To: 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: fork/exec
Date: 2004-02-02 00:11:16
Message-ID: A02DEC4D1073D611BAE8525405FCCE2B55F2B7@harris.memetrics.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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>

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nicolai Tufar 2004-02-02 00:15:20 Q: How ORDER BY is being done inetrnally?
Previous Message Tom Lane 2004-02-01 23:57:39 Re: fork/exec