Re: fork/exec - Mailing list pgsql-hackers

From Claudio Natoli
Subject Re: fork/exec
Date
Msg-id A02DEC4D1073D611BAE8525405FCCE2B55F2B8@harris.memetrics.local
Whole thread Raw
In response to fork/exec  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: fork/exec  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

> One thought I had was that there should be a common subroutine to do the
> stuff that a new postmaster subprocess needs to do immediately at
> startup.  This includes setting IsUnderPostmaster, MyProcPid,
> on_exit_reset in the fork() case, reloading global variables in the
> exec() case, and maybe a couple other things I've forgotten.  We've
> allowed that code to get duplicated across several places now. 

Nice. Could perhaps also get it to do the ugly and oft repeated
setitimer(ITIMER_PROF, &prof_itimer, NULL) and beos_backend_startup() bits,
which currently contribute greatly in making the post-fork code unclear.

Flip you for it? :-)

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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: fork/exec
Next
From: Tom Lane
Date:
Subject: Re: Q: How ORDER BY is being done inetrnally?