| From: | Myron Scott <mkscott(at)sacadia(dot)com> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Threads vs Processes |
| Date: | 2003-09-25 23:19:21 |
| Message-ID: | B1E52B14-EFAE-11D7-A904-00039301524A@sacadia.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers pgsql-hackers-win32 |
On Thursday, September 25, 2003, at 10:03 AM, Tom Lane wrote:
> Shridhar Daithankar <shridhar_daithankar(at)persistent(dot)co(dot)in> writes:
>> One thing that can be done is to arrange all globals/statics in a
>> structure and make that structure thread local.
>
> That's about as far from "non-invasive" as I can imagine :-(
>
> I really, really want to avoid doing anything like the above, because
> it
> would force us to expose to the whole backend many data structures and
> state variables that are currently local to individual .c files. That
> complicates understanding and debugging tremendously, not to mention
> slowing the edit/compile/debug cycle when you are changing such
> structures.
Another option would be to create thread local hashtable or other lookup
structure to which you would register a structure for a particular .c
file
or group of files.
You could then define the structures you need locally without affecting
other parts of the codebase.
Myron Scott
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Greg Sabino Mullane | 2003-09-25 23:31:43 | ctid matching behavior changed? |
| Previous Message | Tom Lane | 2003-09-25 23:15:00 | Re: [HACKERS] Threads vs Processes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kurt at DBC | 2003-09-26 03:52:11 | Re: [HACKERS] Threads vs Processes |
| Previous Message | Tom Lane | 2003-09-25 23:15:00 | Re: [HACKERS] Threads vs Processes |