Re: [pgsql-hackers-win32] Win32 lost signals open item - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: [pgsql-hackers-win32] Win32 lost signals open item
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE456A3F@algol.sollentuna.se
Whole thread Raw
Responses Re: [pgsql-hackers-win32] Win32 lost signals open item  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
>> [ proposed fix ]
>> As you can see, this is quite a bit more complicated than the simple
>> CreateProcess() call we have now.
>> ...
>> If this seems like a reasonable approach, I can see if I can get
>> something together. But it's a fairly large change..
>
>It sounds reasonable to me, in the sense that it is a localized change,
>even if rather messy.  (Perhaps this chunk of code should be
>pushed into
>src/port someplace, instead of being dropped into postmaster.c?)

That's an idea. However, since this has to be tied in with the creationi
of the backend-parameter-file, it's going to have to hit
write_backend_variables() in some way, and have access to postmaster
variables. I think it might be even more messy to push it out.

Basically, I think internal_forkexec() needs to be split up into two -
one win32 and one other. For win32 version, it needs to CreateProcess()
*before* it does write_backend_variables(), and then pass the process id
as a parameter to write_backend_vars().

I think if it should be broken out, we need to break the whole package
of internal_forkexec, read/write_backend_vars, and probably
SubPostmasterMain() out somewhere. Not sure it's worth it.

//Magnus

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [pgsql-hackers-win32] Win32 lost signals open item
Next
From: Tom Lane
Date:
Subject: Re: [pgsql-hackers-win32] Win32 lost signals open item