Re: Extending SQL with C, shared library problem - Mailing list pgsql-novice

From Shawn Garbett
Subject Re: Extending SQL with C, shared library problem
Date
Msg-id 20050720215541.10998.qmail@web54401.mail.yahoo.com
Whole thread Raw
In response to Re: Extending SQL with C, shared library problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Extending SQL with C, shared library problem
Re: Extending SQL with C, shared library problem
List pgsql-novice
--- Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Shawn Garbett <shawn_garbett@yahoo.com> writes:
> > I've got C code written to store a value in the
> > context of an active connection using a hash. It
> > worked until I added some semaphores to control
> memory
> > reads/writes to the shared resource. This is on
> SLES9
> > Linux box running a 2.6.5 kernel.

Okay, I'm offically confused then. I thought the PID
was unique among active connections. Then wouldn't the
hash be accessible from multiple processes and not
just one? Or does the shared library get loaded
separately for each process? If so, then there is no
need at all for a hash table, and a simple global int
would do. Maybe the whole thing is just overkill.

Shawn






____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs


pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Extending SQL with C, shared library problem
Next
From: Shawn Garbett
Date:
Subject: Re: Extending SQL with C, shared library problem