Re: Extending SQL with C, shared library problem

From: Shawn Garbett <shawn_garbett(at)yahoo(dot)com>
To: Shawn Garbett <shawn_garbett(at)yahoo(dot)com>, 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 22:03:15
Message-ID: 20050720220316.5615.qmail@web54407.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

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

Just rewrote it. Trival, like you said. It works
perfectly with just having a single global int. I just
didn't understand the process/thread model inside the
extensional C under Postgresql.

Great!!!! We only have two issues about moving away
from Oracle now: 1) load testing (this shouldn't be a
problem, we currently need about 4TPS, max 10TPS). 2)
Reporting tools.

In the perfect world, a single tool could write fancy
reports versus both PostGres and Oracle. We've yet to
find that tool. New thread maybe?

Shawn

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2005-07-20 22:09:42 Re: Extending SQL with C, shared library problem
Previous Message Shawn Garbett 2005-07-20 21:55:41 Re: Extending SQL with C, shared library problem