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

Re: Extending SQL with C, shared library problem

From: Shawn Garbett <shawn_garbett(at)yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Extending SQL with C, shared library problem
Date: 2005-07-20 21:55:41
Message-ID: 20050720215541.10998.qmail@web54401.mail.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-novice
--- Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Shawn Garbett <shawn_garbett(at)yahoo(dot)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 
 

In response to

Responses

pgsql-novice by date

Next:From: Shawn GarbettDate: 2005-07-20 22:03:15
Subject: Re: Extending SQL with C, shared library problem
Previous:From: Tom LaneDate: 2005-07-20 21:49:05
Subject: Re: Extending SQL with C, shared library problem

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