On Friday 26 September 2003 20:19, Tom Lane wrote: > Shridhar Daithankar <[EMAIL PROTECTED]> writes: > > We really don't need threads to replace existing functionality. That > > would be dog work. > > No, that's not the point at all. The problem we are facing at the > moment with the Windows port is lack of fork(), which means there's > no way for separate-subprocess backends to inherit variable values > from the postmaster. Bruce has been trying to fix that by having the > subprocesses somehow reload or re-deduce all those variables; which > is messy, bug-prone, and probably race-condition-prone too. In a > threaded implementation it would maybe be relatively easy to initialize > a new thread's TLS by copying the postmaster thread's TLS, in which case > a whole pile of as-yet-unwritten Windows-only code won't be needed.
Umm.. I understand child process created by createProcess does not inherit variable values from parent process. That's where problem originates.. We can simply create a registry key that would contain shared memory id from where a child process should get the variable values. And that would need initialization function I talked about earlier. And since anyways TLS->TLS copy is still needed anyways, I think this approach can still save us dealing with threads. God.. it doesn't get any less messy..I hope this is of some value.. Shridhar ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly