Re: fork/exec - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: fork/exec
Date
Msg-id 3929.24.211.141.25.1075687845.squirrel@www.dunslane.net
Whole thread Raw
In response to Re: fork/exec  (Claudio Natoli <claudio.natoli@memetrics.com>)
List pgsql-hackers
Claudio Natoli said:
>
>> Looking at postmaster.c, my head started to spin a little. I think I
>> understood that exec case or not, by the time we get to BackendRun we
>> have already done all the fork/exec action. Have I read this
>> correctly?
>
> Yes. In the normal case, fork() then BackendRun. In the EXEC_BACKEND
> case, fork/exec (or CreateProcess), which then invokes BackendRun via
> SubPostmasterMain.
>
>
>> (This code is getting rather intricate. A Readme file might be nice.
> Just a thought)
>
> Which bits in particular?
>

My concern was that I wanted to make sure that whatever I did was
available to the backend, and in the presence of exec/CreateProcess I
would need either to make sure it got passed to the backend if done
before, or to make sure that it was done after. That's why I wanted to
have the sequence of events clear in my head.

cheers

andrew




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: fork/exec
Next
From: Tom Lane
Date:
Subject: Re: Idea about better configuration options for sort memory