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

2004-11-01 Thread Magnus Hagander
>> I was also hoping to piggyback the socket fix on top of this >> infrastructure. And that *requires* the >write-files-after-createprocess >> method. There is no other way. > >Oh, I had forgotten about that part of the problem. Okay, just gotta >hold our noses and do it I guess. > >(Just to be c

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

2004-11-01 Thread Tom Lane
"Magnus Hagander" <[EMAIL PROTECTED]> writes: > I was also hoping to piggyback the socket fix on top of this > infrastructure. And that *requires* the write-files-after-createprocess > method. There is no other way. Oh, I had forgotten about that part of the problem. Okay, just gotta hold our nos

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

2004-11-01 Thread Magnus Hagander
>> Nope, we need to pass the handle. Only one process can be the >> server-side of the pipe, and once the postmaster has opened it, the >> child process can't do it - the only way to get it is through >> inheritance. > >Grumble. Having to call write_backend_variables from two different >places see

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

2004-11-01 Thread Tom Lane
"Magnus Hagander" <[EMAIL PROTECTED]> writes: > Nope, we need to pass the handle. Only one process can be the > server-side of the pipe, and once the postmaster has opened it, the > child process can't do it - the only way to get it is through > inheritance. Grumble. Having to call write_backend_

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

2004-11-01 Thread Magnus Hagander
>>> Huh? Why? > >> Because we need to write the duplicated socket >structure/pipe handle to >> the parameter file. I guess we could create a separate parameter file >> just for these things, but that seemed a bit unnecessary. > >Do we actually need to pass the handle, or could the subprocess reop

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

2004-11-01 Thread Tom Lane
"Magnus Hagander" <[EMAIL PROTECTED]> writes: >> Huh? Why? > Because we need to write the duplicated socket structure/pipe handle to > the parameter file. I guess we could create a separate parameter file > just for these things, but that seemed a bit unnecessary. Do we actually need to pass the

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

2004-11-01 Thread Magnus Hagander
>> 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(). > >Huh? Why? Because we

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

2004-11-01 Thread Tom Lane
"Magnus Hagander" <[EMAIL PROTECTED]> writes: > 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_backe

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

2004-11-01 Thread Magnus Hagander
>> [ 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 s

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

2004-11-01 Thread Tom Lane
"Magnus Hagander" <[EMAIL PROTECTED]> writes: > [ 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..

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

2004-11-01 Thread Magnus Hagander
>> se, it is that our pipe-based emulation of signals isn't ready to >> collect signal messages until some time after the child >process starts. >> >> Could this be fixed by having the postmaster set up the pipe >*before* it >> forks/execs the child? We'd probably need to pass down some >addit

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

2004-10-31 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > We have this open item: > > Win32 > > o Handle "lost signals" on backend startup (eg. shutdown, > > config file changes, etc); signals are SIG_DFL on startup > > > The problem here is that the postmast

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

2004-10-31 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > We have this open item: > Win32 > o Handle "lost signals" on backend startup (eg. shutdown, > config file changes, etc); signals are SIG_DFL on startup > The problem here is that the postmaster might send signals to a >