[postgis-devel] PostGIS debug messages
Johann.Eggers at tomtom.com
Thu Apr 25 06:50:38 PDT 2013
We are using the following:
PostgreSQL 9.1.9 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4), 64-bit
POSTGIS="1.5.8" GEOS="3.3.4-CAPI-1.7.3" PROJ="Rel. 4.8.0, 6 March 2012" LIBXML="2.7.6" USE_STATS
Recently we encountered PostgreSQL segmentation faults and we recompiled PostgreSQL and PostGIS with --enable-debug to get a reasonable backtrace from a core dump.
After activating the new debug-enabled binaries we experienced huge problems in a way that the memory on the clients were filled up which caused them to be stalled.
On database level no impact was seen although we could clearly see a much higher memory consumption on the client side.
Root cause analysis resulted that debug information was also transported to the clients (Tomcat's) and hogged memory which stalled them.
The tons of additional messages are generated by PostGIS when debug is enabled.
psql:test.sql:2: NOTICE: [lwgeom_gist.c:LWGEOM_gist_decompress:783] GIST: LWGEOM_gist_decompress called 267
psql:test.sql:2: NOTICE: [lwgeom_gist.c:LWGEOM_gist_consistent:585] GIST: LWGEOM_gist_consistent called
psql:test.sql:2: NOTICE: [lwgeom_gist.c:lwgeom_rtree_leaf_consistent:713] GIST: rtree_leaf_consist called with strategy=3
psql:test.sql:2: NOTICE: [lwgeom_gist.c:lwgeom_rtree_leaf_consistent:737] 254:gist test (leaf) <9.75152 55.5182,9.75152 55.5182> && <9.64161 55.5169,9.68048 55.5384> --> 0
As you can see these additional messages are at severity NOTICE which will be sent to the client when using the postgres default value for client_min_messages = NOTICE
Changing client_min_messages to WARNING will stop that.
Nevertheless it's really strange that PostGIS sends debug messages with severity NOTICE where it should better use severity DEBUG1 or similar.
Are there any plans to change that?
I couldn't find anything mentioned in the PostGIS documentation so it would be of great help to add a note re. this behavior
More information about the postgis-devel