[postgis-devel] How to create a backend cache instead of query cache?

Paul Ramsey pramsey at cleverelephant.ca
Thu Apr 25 09:32:07 PDT 2013

I did some research a while ago on things living longer than a statement, but didn't find any obvious "good" solution. Just avoid the global area, obviously. If you read through the pgsql memory context code you'll find a few global variables that link to various contexts at different levels.


Paul Ramsey

On Thursday, April 25, 2013 at 7:31 AM, Stephen Woodbridge wrote:

> Hi guys,
> Has anyone come across any information on building caches in other contexts?
> backend cache - lifetime of backend server
> connection cache - lifetime of the connection
> query cache - Got this one working
> For the address standardizer, these objects are fairly stable and will 
> not change for a given application. In the extreme case, where the 
> server is providing multiple geocoders it is possible to have multiple 
> standardizer objects.
> Regina has requested that I look for something that has a longer context 
> than a statement.
> I suspect that there are potential issues that need to be addressed like 
> locking the object in the cache while it is being used, so it is not 
> deleted out from under you while it is in use because another thread 
> needs to create a new object in the slot you are using.
> Thoughts on this?
> Any examples you know of I could look at?
> Thanks,
> -Steve
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org (mailto:postgis-devel at lists.osgeo.org)
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel

More information about the postgis-devel mailing list