[postgis-devel] Bogus PROJ4 memory context definition crashes Postgres
mark.cave-ayland at ilande.co.uk
Wed Jul 11 12:54:25 PDT 2007
On Wed, 2007-07-11 at 15:03 -0400, Tom Lane wrote:
> If an "out of memory" condition occurs while using transform(),
> Postgres will crash every time, because the memory manager code
> will try to dump memory context stats to the postmaster log ...
> and the Postgis code doesn't provide a stats method for its custom
> memory context type. Providing this method type is not optional.
Oops. That code is my fault - I'll see if I can come up with a patch to
fix this. Is this easy to simulate just with a large palloc()?
> I do not think the reset and is_empty methods are optional either,
> although I don't have such a simple example of where they might
> get called.
Will look at these too. The only reason the MemoryContext exists in the
first place is because we need to be able to cache library handles for
PROJ.4, and so we need a hook when the backend exits in order to free
all the handles we have used. Do you know of a better way of doing this,
preferably with compatibility down to PostgreSQL 7.2?
> BTW, I would have filed this report at
> http://postgis.refractions.net/bugs/, except I don't have an
> account there and there is no way offered to create one.
> Is this a by-invitation-only bug tracker?
No, it shouldn't be - although there has been quite a lot of spam over
the past few weeks which may explain it :(
ILande - Open Source Consultancy
More information about the postgis-devel