Re: PQexec() hangs on OOM

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: hlinnaka(at)iki(dot)fi
Cc: Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: PQexec() hangs on OOM
Date: 2015-04-06 06:59:32
Message-ID: CAB7nPqSb3RF=s+BDyq1Un2+rng20EQQyxajdTRtpRG7XsyuLnw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Apr 6, 2015 at 3:54 PM, Michael Paquier <michael(dot)paquier(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Slavov 2015-04-06 12:35:19 Re: BUG #12910: Memory leak with logical decoding
Previous Message Michael Paquier 2015-04-06 06:54:37 Re: PQexec() hangs on OOM