From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com> |
Cc: | PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgresql(dot)org> |
Subject: | Re: fork/exec |
Date: | 2003-11-28 19:48:51 |
Message-ID: | 200311281948.hASJmpG11966@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers-win32 |
Claudio Natoli wrote:
> * With regards to BackendFork itself, was your plan to reduce this to simply
> formatting the argument list, and calling fork/exec, with things like random
> number seeding and the like moved into PostgresMain? (ie. the BackendFork
> call would actually be performed by the Postmaster, with BackendFork
> rewritten such that no "global" context is required between the fork and
> exec calls; which'll be what we need to make Win32/CreateProcess changes
> possible). If not, could you give me an idea of what you had intended?
You will see code in postmaster.c that calls
write_nondefault_variables(). That basically dumps out GUC
variables into a binary file to be read in by fork/exec backends. My
idea is that we will need another similar file for postmaster constants.
The random seed value is unique per-backend, and we want to keep it
secure so we can't pass it on the command line. I am not sure how to
deal with that. I hesitate to add a per-backend file to pass such
things. Does anyone have ideas on how to pass a data value to an
exec()'ed child? Maybe we have to use a pipe between parent/child and
pass the values that way.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-11-28 19:50:00 | Re: fork/exec |
Previous Message | Bruce Momjian | 2003-11-28 19:41:20 | Re: fork/exec |