Skip site navigation (1) Skip section navigation (2)

Re: Threads vs Processes (was: NuSphere and PostgreSQL for window s)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>
Cc: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>,Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org,pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: Threads vs Processes (was: NuSphere and PostgreSQL for window s)
Date: 2003-09-25 15:00:18
Message-ID: 9297.1064502018@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-hackers-win32
Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com> writes:
>> How are you dealing with the issue of wanting some static variables to
>> be per-thread and others not?

> To be perfectly honest, I'm still trying to familiarize myself with the code
> sufficiently well so that I can tell which variables need to be per-thread
> and which are shared (and, in turn, which of these need to be protected from
> concurrent access).

Well, the first-order approximation would be to duplicate the current
fork semantics: *all* static variables are per-thread, and should be
copied from the parent thread at thread creation.  If there is some
reasonably non-invasive way to do that, we'd have a long leg up on the
problem.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tim McAuleyDate: 2003-09-25 15:12:50
Subject: Re: sequence's plpgsql
Previous:From: Claudio NatoliDate: 2003-09-25 14:47:23
Subject: Re: Threads vs Processes (was: NuSphere and PostgreSQL for window

pgsql-hackers-win32 by date

Next:From: Shridhar DaithankarDate: 2003-09-25 15:21:59
Subject: Re: [HACKERS] Threads vs Processes
Previous:From: Claudio NatoliDate: 2003-09-25 14:47:23
Subject: Re: Threads vs Processes (was: NuSphere and PostgreSQL for window

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group