SHM_QUEUE
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:
Show quoted text
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: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
Import Notes
Reply to msg id not found: 57646.207.46.228.14.1056134837.squirrel@mailbox.samurai.com