Andreas Pflug <pgadmin@pse-consulting.de> writes:
> Tom Lane wrote:
>> BTW, I've been wondering lately if we'd not be better off to look at
>> using threading in the Windows port, if it'd help us get around the
>> fork/exec data transfer problem.
> When talking about threading in pgsql to Bruce on Linuxtag, he stated
> that the main problem would be the tons of global variables used
> throughout the backend.
Yeah, it would reverse the problem from "how to share data" to "how not
to share data". We'd want to find a way to ensure that the bulk of the
static data becomes per-thread data (or, in some cases, add a mutex so
that multiple threads can safely share one copy). It won't be a trivial
bit of work, but conceivably it could be less messy than trying to store
and reload many of those same variables.
regards, tom lane