Hi,<br><br>I'm having a strange situation.<br>I don't sure it is an error, but a query that seem simple after about 7 hours don't terminate so I stop it and because the log don't report anything,<br>I decide to set max level of detail (debug5) and verbose information.<br>
<br>(I work on windows 7 - 64 bit with postgres 8.4.4. 32 bit and postgis 1.5.1)<br><br>The query is this:<br><br>INSERT INTO public._test_campionamento_mp (id,idrtt,geom) (<br>    select<br>        <a href="http://c.id">c.id</a>,<br>
        c.idrtt,<br>        st_force_2d(st_multi(st_union(c.geom)))<br>    from (<br>        select <br>            <a href="http://a.id">a.id</a> as id,<br>            a.idrtt as idrtt,<br>            (ST_DumpPoints(a.geom)).* as geom<br>
        from <br>            public._test_campionamento as a<br>    ) as c<br>    group by<br>        <a href="http://c.id">c.id</a>,<br>        c.idrtt<br>);<br><br>See-ing the log I can notice that it initially don't report nothing about some errors.<br>
The log was like thi:<br><br>...<br>    SQL function "st_dumppoints" statement 1<br>2010-09-03 14:41:43 CEST LOCATION:  exec_stmt_raise, .\src\pl\plpgsql\src\pl_exec.c:2545<br>2010-09-03 14:41:43 CEST DEBUG:  00000: <NULL>,ST_MultiLineString<br>
2010-09-03 14:41:43 CEST CONTEXT:  SQL function "st_dumppoints" statement 1<br>2010-09-03 14:41:43 CEST LOCATION:  exec_stmt_raise, .\src\pl\plpgsql\src\pl_exec.c:2545<br>2010-09-03 14:41:43 CEST DEBUG:  00000: {1},ST_LineString<br>
2010-09-03 14:41:43 CEST CONTEXT:  funzione PL/pgSQL "_st_dumppoints" linea 22 a ciclo FOR su righe di SELECT<br>    SQL function "st_dumppoints" statement 1<br>2010-09-03 14:41:43 CEST LOCATION:  exec_stmt_raise, .\src\pl\plpgsql\src\pl_exec.c:2545<br>
2010-09-03 14:41:43 CEST DEBUG:  00000: <NULL>,ST_MultiLineString<br>2010-09-03 14:41:43 CEST CONTEXT:  SQL function "st_dumppoints" statement 1<br>2010-09-03 14:41:43 CEST LOCATION:  exec_stmt_raise, .\src\pl\plpgsql\src\pl_exec.c:2545<br>
2010-09-03 14:41:43 CEST DEBUG:  00000: {1},ST_LineString<br>2010-09-03 14:41:43 CEST CONTEXT:  funzione PL/pgSQL "_st_dumppoints" linea 22 a ciclo FOR su righe di SELECT<br>    SQL function "st_dumppoints" statement 1<br>
2010-09-03 14:41:43 CEST LOCATION:  exec_stmt_raise, .\src\pl\plpgsql\src\pl_exec.c:2545<br>2010-09-03 14:41:43 CEST DEBUG:  00000: <NULL>,ST_MultiLineString<br>2010-09-03 14:41:43 CEST CONTEXT:  SQL function "st_dumppoints" statement 1<br>
2010-09-03 14:41:43 CEST LOCATION:  exec_stmt_raise, .\src\pl\plpgsql\src\pl_exec.c:2545<br>2010-09-03 14:41:43 CEST DEBUG:  00000: {1},ST_LineString<br>2010-09-03 14:41:43 CEST CONTEXT:  funzione PL/pgSQL "_st_dumppoints" linea 22 a ciclo FOR su righe di SELECT<br>
    SQL function "st_dumppoints" statement 1<br>2010-09-03 14:41:43 CEST LOCATION:  exec_stmt_raise, .\src\pl\plpgsql\src\pl_exec.c:2545<br>2010-09-03 14:41:43 CEST DEBUG:  00000: <NULL>,ST_MultiLineString<br>
2010-09-03 14:41:43 CEST CONTEXT:  SQL function "st_dumppoints" statement 1<br>2010-09-03 14:41:43 CEST LOCATION:  exec_stmt_raise, .\src\pl\plpgsql\src\pl_exec.c:2545<br>2010-09-03 14:41:43 CEST DEBUG:  00000: {1},ST_LineString<br>
2010-09-03 14:41:43 CEST CONTEXT:  funzione PL/pgSQL "_st_dumppoints" linea 22 a ciclo FOR su righe di SELECT<br>...<br><br>but after few time it report an error and the execution of the query seem to stop.<br><br>
.....<br>2010-09-03 14:44:19 CEST CONTEXT:  funzione PL/pgSQL "_st_dumppoints" linea 22 a ciclo FOR su righe di SELECT<br>    SQL function "st_dumppoints" statement 1<br>2010-09-03 14:44:19 CEST LOCATION:  exec_stmt_raise, .\src\pl\plpgsql\src\pl_exec.c:2545<br>
2010-09-03 14:44:19 CEST DEBUG:  00000: <NULL>,ST_MultiLineString<br>2010-09-03 14:44:19 CEST CONTEXT:  SQL function "st_dumppoints" statement 1<br>2010-09-03 14:44:19 CEST LOCATION:  exec_stmt_raise, .\src\pl\plpgsql\src\pl_exec.c:2545<br>
2010-09-03 14:44:19 CEST DEBUG:  00000: {1},ST_LineString<br>2010-09-03 14:44:19 CEST CONTEXT:  funzione PL/pgSQL "_st_dumppoints" linea 22 a ciclo FOR su righe di SELECT<br>    SQL function "st_dumppoints" statement 1<br>
2010-09-03 14:44:19 CEST LOCATION:  exec_stmt_raise, .\src\pl\plpgsql\src\pl_exec.c:2545<br>2010-09-03 14:44:19 CEST DEBUG:  00000: mapped win32 error code 2 to 2<br>2010-09-03 14:44:19 CEST LOCATION:  _dosmaperr, .\src\port\win32error.c:182<br>
2010-09-03 14:44:19 CEST DEBUG:  00000: mapped win32 error code 2 to 2<br>2010-09-03 14:44:19 CEST LOCATION:  _dosmaperr, .\src\port\win32error.c:182<br>2010-09-03 14:44:20 CEST DEBUG:  00000: mapped win32 error code 2 to 2<br>
2010-09-03 14:44:20 CEST LOCATION:  _dosmaperr, .\src\port\win32error.c:182<br>2010-09-03 14:44:20 CEST DEBUG:  00000: mapped win32 error code 2 to 2<br>2010-09-03 14:44:20 CEST LOCATION:  _dosmaperr, .\src\port\win32error.c:182<br>
2010-09-03 14:44:23 CEST DEBUG:  00000: mapped win32 error code 2 to 2<br>2010-09-03 14:44:23 CEST LOCATION:  _dosmaperr, .\src\port\win32error.c:182<br>2010-09-03 14:44:28 CEST DEBUG:  00000: my backend id is 3<br>2010-09-03 14:44:28 CEST LOCATION:  SharedInvalBackendInit, .\src\backend\storage\ipc\sinvaladt.c:316<br>
2010-09-03 14:44:28 CEST DEBUG:  00000: StartTransaction<br>2010-09-03 14:44:28 CEST LOCATION:  ShowTransactionState, .\src\backend\access\transam\xact.c:4077<br>2010-09-03 14:44:28 CEST DEBUG:  00000: name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: <br>
2010-09-03 14:44:28 CEST LOCATION:  ShowTransactionStateRec, .\src\backend\access\transam\xact.c:4115<br>2010-09-03 14:44:28 CEST DEBUG:  00000: CommitTransaction<br>2010-09-03 14:44:28 CEST LOCATION:  ShowTransactionState, .\src\backend\access\transam\xact.c:4077<br>
2010-09-03 14:44:28 CEST DEBUG:  00000: name: unnamed; blockState:       STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: <br>2010-09-03 14:44:28 CEST LOCATION:  ShowTransactionStateRec, .\src\backend\access\transam\xact.c:4115<br>
2010-09-03 14:44:28 CEST DEBUG:  00000: autovacuum: processing database "template0"<br>2010-09-03 14:44:28 CEST LOCATION:  AutoVacWorkerMain, .\src\backend\postmaster\autovacuum.c:1628<br>2010-09-03 14:44:28 CEST DEBUG:  00000: StartTransaction<br>
2010-09-03 14:44:28 CEST LOCATION:  ShowTransactionState, .\src\backend\access\transam\xact.c:4077<br>2010-09-03 14:44:28 CEST DEBUG:  00000: name: unnamed; blockState:       DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children: <br>
2010-09-03 14:44:28 CEST LOCATION:  ShowTransactionStateRec, .\src\backend\access\transam\xact.c:4115<br>2010-09-03 14:44:28 CEST DEBUG:  00000: pg_type: vac: 0 (threshold 107), anl: 0 (threshold 78)<br>2010-09-03 14:44:28 CEST LOCATION:  relation_needs_vacanalyze, .\src\backend\postmaster\autovacuum.c:2627<br>
2010-09-03 14:44:28 CEST DEBUG:  00000: pg_statistic: vac: 62 (threshold 119), anl: 62 (threshold 85)<br>...<br><br>after this seem the running of the query will be stopped.<br>Because the log don't report nothing else about the query.<br>
I don't understand if the error reported:<br><br>2010-09-03 14:44:19 CEST LOCATION:  exec_stmt_raise, .\src\pl\plpgsql\src\pl_exec.c:2545<br>
2010-09-03 14:44:19 CEST DEBUG:  00000: mapped win32 error code 2 to 2<br>
2010-09-03 14:44:19 CEST LOCATION:  _dosmaperr, .\src\port\win32error.c:182<br>
<br>is on postgis or on postgres.<br><br>Any hints is welcome,<br><br>Thx<br><br>-- <br>-----------------<br>Andrea Peri<br>. . . . . . . . . <br>qwerty àèìòù<br>-----------------<br><br>