Re: Shared memory and memory context question

From: Richard Hills <richard(at)playford(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Shared memory and memory context question
Date: 2006-02-05 17:13:29
Message-ID: 200602051713.29159.richard@playford.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun February 5 2006 16:16, Tom Lane wrote:
> AFAICT the data structures you are worried about don't have any readily
> predictable size, which means there is no good way to keep them in
> shared memory --- we can't dynamically resize shared memory. So I think
> storing the rules in a table and loading into private memory at need is
> really the only reasonable solution. Storing them in a table has a lot
> of other advantages anyway, mainly that you can manipulate them from
> SQL.

I have come to the conclusion that storing the rules and various other bits in
tables is the best solution, although this will require a much more complex
db structure than I had originally planned. Trying to allocate and free
memory in shared memory is fairly straightforward, but likely to become
incredibly messy.

Seeing as some of the rules already include load-value-from-db-on-demand, it
should be fairly straightforward to extend it to load-rule-from-db-on-demand.

Thanks for all your help,

Regards,

Richard

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2006-02-05 17:53:01 Re: Krb5 & multiple DB connections
Previous Message Tom Lane 2006-02-05 16:16:39 Re: Shared memory and memory context question