Mark Harrison <[EMAIL PROTECTED]> writes: > res = PQexec(conn,"DECLARE cur CURSOR FOR select * from assets limit 8888"); > printf("PQexec declare %s\n", PQresStatus(PQresultStatus(res))); > PQclear(res);
> rc = PQsendQuery(conn, fetchstr); > printf("PQsendQuery %d\n", rc); > PQclear(res); You just re-cleared an already cleared result. This probably caused a double free, corrupting malloc's datastructures. The later crash within malloc is not surprising... regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings