Re: PQexec() hangs on OOM - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: PQexec() hangs on OOM
Date
Msg-id CAB7nPqSb3RF=s+BDyq1Un2+rng20EQQyxajdTRtpRG7XsyuLnw@mail.gmail.com
Whole thread Raw
In response to Re: PQexec() hangs on OOM  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: PQexec() hangs on OOM
List pgsql-bugs
On Mon, Apr 6, 2015 at 3:54 PM, Michael Paquier  <michael.paquier@gmail.com>
wrote:

> In this case, as what happens is an OOM related to the allocation of
> PGResult, I think that we had better store a status flag in PGConn related
> to this OOM, as PGConn->errorMessage may not be empty to take care of the
> ambiguity that PGResult == NULL does not necessarily mean wait for more
> results. Something like PGResultStatus to avoid any API incompatibility.
> Thoughts?
>

Second idea: return a status with parseInput as it is not part of the APIs
of libpq.
--
Michael

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: PQexec() hangs on OOM
Next
From: Tom Lane
Date:
Subject: Re: PQexec() hangs on OOM