On Sun February 5 2006 14:43, Martijn van Oosterhout wrote: > So what you load are the already processed rules? In that case you > could probably use the buffer management system. Ask it to load the > blocks and they'll be in the buffer cache. As long as you have the > buffer pinned they'll stay there. That's pretty much a read-only > approach. > > If you're talking about things that don't come from disk, well, hmm... > If you want you could use a file on disk as backing and mmap() it into > each processes address space... <...> > The real question is, does it need to be shared-writable. > Shared-readonly is much easier (ie one writer, multiple readers). Using > a file as backing store for mmap() may be the easiest....
I load the rules from a script and parse them, storing them in a forest of linked malloced structures. These structures are created by one writer but then read by a number of readers, and later may be removed by the original writer. So, as you can imagine, I could store the forest in the db, although it might be a mess. First I will look through the buffer management system, and see if that will do the job. Thanks for your help, Regards, Richard ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match