SHM_QUEUE

From: Nailah Ogeer <ogeer(at)cs(dot)queensu(dot)ca>
To: <pgsql-general(at)postgresql(dot)org>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: SHM_QUEUE
Date: 2003-06-23 16:13:58
Message-ID: Pine.SOL.4.33.0306231206320.27694-100000@innovate
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers


just have a quick question. What i need to do is to create a shared memory
structure (which i can do) and maintain in it a linked list which should
be in shared memory too. I found the shmemqueue in postgres, but am having
some problems using it. I just need to have the linked list store
relation OID's. I see there is an Insert before and after which takes in
an element and adds it to the queue. But the thing is - they are both
SHM_QUEUE types. How can i convert an Oid to this type? Also, am i right
in assuming that i can use this? I was looking for some examples of its
use too.
thanks

nailah

On Fri, 20 Jun 2003, Neil Conway wrote:

> Hi Nailah,
>
> I hope your summer is going well. I saw your post on -hackers regarding some
> problems with hash_search. The dynahash API can be a little bit picky -- IIRC,
> it requires you to NULL pad hash keys out to the appropriate length, rather
> than just using a regular NULL-terminated C-string. You weren't specific on
> the exact problem you were having, but perhaps taking a look at
> src/backend/commands/prepare.c (in PostgreSQL 7.3 or later) would be helpful:
> it is a simple example of manipulating a hash table of prepared statements
> that I wrote last summer. Since last I heard you guys were still working with
> 7.1, you can find the code in question here:
>
> http://developer.postgresql.org/cvsweb.cgi/~checkout~/pgsql-server/src/backend/commands/prepare.c?rev=1.18&content-type=text/plain
>
> If that doesn't help, the usual fallback of breaking of gdb and stepping
> through the troublesome code might help track down the problem.
>
> BTW, I'm not subscribed to the -hackers list temporarily (just for the summer,
> as I'm busy w/ MS work), so my response to questions posted there will
> probably be erratic (I just browse the archives on the web occaisonally).
>
> -Neil
>

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Gearon 2003-06-23 16:36:08 Re: [GENERAL] interesting PHP/MySQL thread
Previous Message Dennis Gearon 2003-06-23 16:07:38 Re: [GENERAL] interesting PHP/MySQL thread

Browse pgsql-hackers by date

  From Date Subject
Next Message Hans-Jürgen Schönig 2003-06-23 16:24:32 dblink for Oracle - question ...
Previous Message Josh Berkus 2003-06-23 16:00:59 Re: Two Phase Commit WAS: Re: Two weeks to feature freeze