fork/exec patch: pre-CreateProcess finalization - Mailing list pgsql-patches

From Claudio Natoli
Subject fork/exec patch: pre-CreateProcess finalization
Date
Msg-id A02DEC4D1073D611BAE8525405FCCE2B0280A9@harris.memetrics.local
Whole thread Raw
Responses Re: fork/exec patch: pre-CreateProcess finalization  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
For application to HEAD, pending community review.

Final rearrangement of main postgresql child process (ie.
BackendFork/SSDataBase/pgstat) startup, to allow fork/exec calls to closely
mimic (the soon to be provided) Win32 CreateProcess equivalent calls.

Whereas the existing code forks and allow the child process to marshal up
its "argument list", the EXEC_BACKEND case has been changed to allow the
parent process to do this marshalling, with the child process exec'ing
immediately after the fork.

This has required some reworking of the existing code base, particularly to
BackendFork (which now actually does the fork()). As such, I've been
anticipating that this will be the most controversial of the fork/exec
patches, so critique away :-)

This is the last patch required before the actual Win32 calls can be put in
place.

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>



Attachment

pgsql-patches by date:

Previous
From: "Peter Eisentraut"
Date:
Subject: Re: Quoting of psql \d output
Next
From: Tom Lane
Date:
Subject: Re: fork/exec patch: pre-CreateProcess finalization