Re: Threads vs Processes - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Threads vs Processes
Date
Msg-id 15594.1064587756@sss.pgh.pa.us
Whole thread Raw
In response to Re: Threads vs Processes  (Shridhar Daithankar <shridhar_daithankar@persistent.co.in>)
Responses Re: Threads vs Processes  (Shridhar Daithankar <shridhar_daithankar@persistent.co.in>)
Re: Threads vs Processes  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Threads vs Processes  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List pgsql-hackers
Shridhar Daithankar <shridhar_daithankar@persistent.co.in> 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.

            regards, tom lane

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [pgsql-hackers-win32] Threads vs Processes
Next
From: Tom Lane
Date:
Subject: Re: [ADMIN] postgres 6.2 vacuum