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

Re: Shared memory and memory context question

From: Neil Conway <neilc(at)samurai(dot)com>
To: richard(dot)hills(at)balliol(dot)oxford(dot)ac(dot)uk
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Shared memory and memory context question
Date: 2006-02-06 01:09:16
Message-ID: 1139188156.9135.25.camel@localhost.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Sun, 2006-02-05 at 14:03 +0000, richard(at)playford(dot)net wrote:
> 3. Somehow create shared memory using the shmem functions, and set a memory 
> context to live *inside* this shared memory, which my trigger functions can 
> then switch to. Then use palloc() and pfree() without worrying..

This has been done before, by the TelegraphCQ folks: they implemented a
shared memory MemoryContext on top of OSSP MM[1]. The code is in the
v0.2 TelegraphCQ tarball[2] -- see shmctx.c and shmset.c in
src/backend/utils/mmgr/. I'm not aware of an independent distribution,
but you could probably separate it out without too much pain.

(Of course, the comments elsewhere in the thread about using an
alternative are probably still true...)



In response to

pgsql-hackers by date

Next:From: Stephan SzaboDate: 2006-02-06 03:14:49
Subject: Re: Copy From & Insert UNLESS
Previous:From: James William PyeDate: 2006-02-06 00:51:01
Subject: Re: Copy From & Insert UNLESS

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