[MAPSERVER-USERS] CLOSE_CONNECTION=DEFER - Segmentation fault

Carlos_Molina dr.chamberlain at gmail.com
Fri Mar 28 12:47:23 EDT 2008


I miss one extra query right here:
DECLARE mycursor2 BINARY CURSOR FOR SELECT... // getShape(1)
FETCH ALL in mycursor2
CLOSE mycursor2
ROLLBACK
//////////////////////////////////////////////////////////queryByAttribute///////////////////////////////////////////////////////////////
ERROR:  DECLARE CURSOR may only be used in transaction blocks
WARNING:  there is no transaction in progress
statement: rollback
statement: begin
ERROR:  cursor "mycursor" does not exist
ABORT

I tried this QueryByAttribute by itself, without the first QueryByRect I
showed no my last post and it seems to be missing a BEGIN statement for its
cursor.

Saludos!


Carlos_Molina wrote:
> 
> 
> Dave Fuhry wrote:
>> 
>> Ivan,
>> 
>>    p.mapper seems to use the typical php
>> {map,layer}Obj_queryBy{Point,Rect,etc.} functions.  These calls end up
>> calling the same msPOSTGIS* functions as everything else.
>> 
>>    I can't seem to reproduce your problem with a simple testcase
>> (basically, the attached files).  It might help if you can set
>> log_min_duration_statement = 0 in your postgresql.conf, reproduce the
>> problem, and send the output from your postgresql log file.  It will
>> show all commands issued to the database, including the BEGIN, and the
>> DECLARE CURSOR ..., and FETCH for every layer.
>> 
>>    I can setup p.mapper if that's necessary to reproduce the problem.
>> 
>>   (By the way, I assume you're not using an ancient version of
>> postgis, in the 0.5 - 0.6 era.  There is an alternate codepath for
>> that, which I have not tested.)
>> 
>> Thanks,
>> 
>> Dave
>> 
> 
> Hello Dave,
> 
> I've tried first and second version of your patch and both resolved my
> first issue of many many BEGIN statements being issued by cursors so my
> application went back to running smoothly. The sad part is that another
> issued arised from this patch and It's when using python mapscript and the
> drawQuery call. 
> If i just render my .map file with draw() I get no trouble, but if I open
> my map file, get a single layer from it, query the layer, open the layer
> to retrieve results and call drawQuery() afterwards to render everything
> like I used to do before the patch, I get the following error(I resumed
> the sql statements):
> 
> BEGIN
> DECLARE mycursor BINARY CURSOR FOR SELECT...  // queryByPoint
> FETCH ALL in mycursor
> CLOSE mycursor
> SELECT * FROM... "same as above" WHILE false LIMIT 0 // Dont know why this
> is issued, might be openLayer or just to get the field names of the table
> WARNING:  there is already a transaction in progress
> BEGIN
> DECLARE mycursor2 BINARY CURSOR FOR SELECT... // getShape(0)
> FETCH ALL in mycursor2
> CLOSE mycursor2
> ROLLBACK
> BEGIN
> DECLARE mycursor2 BINARY CURSOR FOR SELECT... // getShape(1)
> FETCH ALL in mycursor2
> CLOSE mycursor2
> ROLLBACK
> ERROR:  DECLARE CURSOR may only be used in transaction blocks
> WARNING:  there is no transaction in progress
> statement: rollback
> statement: begin
> ERROR:  cursor "mycursor" does not exist
> ABORT
> 
> Regards
> 
> Carlos Molina
> 

-- 
View this message in context: http://www.nabble.com/CLOSE_CONNECTION%3DDEFER----Segmentation-fault-tp15786741p16353907.html
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the mapserver-users mailing list