From: | "Inoue, Hiroshi" <h-inoue(at)dream(dot)email(dot)ne(dot)jp> |
---|---|
To: | TAKATSUKA Haruka <harukat(at)sraoss(dot)co(dot)jp> |
Cc: | pgsql-odbc(at)postgresql(dot)org |
Subject: | Re: Silent MALLOC/REALLOC error |
Date: | 2018-03-12 07:06:50 |
Message-ID: | 7153825a-4b01-cb09-1b21-147470a1b04a@dream.email.ne.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
Hi TAKATSUKA-san,
sorry for the late reply.
On 2018/02/27 18:33, TAKATSUKA Haruka wrote:
> Hello, psqlODBC team.
>
> When we fetch large data via psqlodbc, we sometimes fail to
> get all rows completely without any API's error responses;
> SQLExecDirect returns SQL_SUCCESS and SQLFetch returns just SQL_NODATA.
> But there are QR_REALLOC_error reported in mylog at that time.
>
> I reproduced it by tweaking QR_REALLOC_return_with_error macro
> to intentionally fail to allocate memory frequently.
>
> I propose the patch attached.
> It makes the code in CC_send_query_append() go out the while-loop immediately
> after CC_from_PGresult() at the case PORES_BAD_RESPONSE, PORES_FATAL_ERROR or PORES_NO_MEMORY_ERROR.
Thanks for the bug report.
By applying your patch, subsequent queries after ALLOC errors are
rejected unfortunately
with the error message 'another command is already in progress'.
I propose the patch attached. Does the patch work well in your test cases?
regards,
Hiroshi Inoue
>
>
> Thanks,
> Haruka Takatsuka
Attachment | Content-Type | Size |
---|---|---|
connection.diff | text/plain | 1.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Ayappan P2 | 2018-03-12 15:10:06 | Compilation fails with XLC in AIX |
Previous Message | Steve Haley | 2018-03-06 19:07:02 | Lost Data Connection |