[postgis-tickets] [PostGIS] #3946: PostgreSQL 11 head no longer compiles against PostGIS trunk
PostGIS
trac at osgeo.org
Tue Dec 19 05:56:13 PST 2017
#3946: PostgreSQL 11 head no longer compiles against PostGIS trunk
----------------------+---------------------------
Reporter: robe | Owner: robe
Type: defect | Status: new
Priority: blocker | Milestone: PostGIS 2.5.0
Component: postgis | Version: trunk
Resolution: | Keywords:
----------------------+---------------------------
Comment (by pramsey):
I only see `MemoryContextCreate` in three places, but in at least two of
them (geos prepared and proj) they are being used in ways that are not
consistent with `AllocSetContextCreate`. They are being used as memory
management tricks by the caching code for geos prepared geometry and proj
handles. The problem is that geos and proj both allocate outside the pgsql
memory manager, and we want to free up any resources in the cache once a
pgsql statement ends. But we have no way of knowing when a statement is
complete. So we create our own memory context and tuck it into the
statement context. Now, when the statement ends, it has to first tell our
own context to clean itself up. And into the cleanup routine of our
context we add the code that frees up our cached geos/proj objects.
Basically, we don't use those contexts for storing things, we just use
them to hide a callback. So we cannot change those over to
`AllocSetContextCreate` calls, we have to figure out how to continue to
use them, or figure some other way to get a callback when a statement
ends.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3946#comment:4>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list