libpq incompatibility
От | Admin Gaston |
---|---|
Тема | libpq incompatibility |
Дата | |
Msg-id | 00a001c351b5$511aff00$02193264@compu2 обсуждение исходный текст |
Ответы |
Re: libpq incompatibility
|
Список | pgsql-bugs |
Hi, sorry my english. Recently i was using postgresql 7.2, and then i updat= e to 7.3.3. We was running a C program that was working fine with 7.2, but = in 7.3.3 it seg fault. int procesarConsultasSQL(int nCliente){ .......... more code FD_SET(cli->socketDB, &readfds); timeout.tv_sec =3D timeout.tv_usec =3D 0; select(cli->socketDB + 1, &readfds, NULL, NULL, &timeout); if (FD_ISSET(cli->socketDB, &readfds)){ if (PQconsumeInput(cli->conn)){ if (!PQisBusy(cli->conn)){ while ((cli->res =3D PQgetResult(cli->conn)) !=3D NULL){ //procesamos los datos devueltos por la base de datos, = ya sean //select's o update's y lo agregamos en la cola de envi= o del cliente switch(PQresultStatus(cli->res)){ ....... more code } ....... more code PQclear(cli->res); } ........ more code } } } ....... more code } When the program is running for a while, it finish with segmentation fault = (core dumped). #0 0x420742e2 in _int_malloc () from /lib/tls/libc.so.6 #1 0x4207360b in malloc () from /lib/tls/libc.so.6 #2 0x400278b3 in PQmakeEmptyPGresult () from /usr/lib/libpq.so.3 #3 0x40028387 in PQconsumeInput () from /usr/lib/libpq.so.3 #4 0x400282f1 in PQconsumeInput () from /usr/lib/libpq.so.3 #5 0x4002886a in PQisBusy () from /usr/lib/libpq.so.3 #6 0x0804c3dc in procesarConsultasSQL(int) () #7 0x0804cfe0 in main () Is this a know bug?, or the way i am programming this isn't correct? Any he= lp is aprecciated, and thanks to Tom Lane for my other problem, it was solv= ed. Regards, Tavella Gaston.=
В списке pgsql-bugs по дате отправления: