"David G. Johnston" <david.g.johns...@gmail.com> writes:
> On Wed, Dec 21, 2016 at 9:49 AM, Tom Lane <t...@sss.pgh.pa.us> wrote:
>> A possible objection is that if we really are on the hairy edge of OOM,
>> trying to construct such error strings might push us over the edge
> What am I missing here? Constructing said string occurs on the local end
> of the connection but the memory problem exists on the remote end.
Um, that's not clear, in fact it's not likely. The backend usually
manages to tell you so if it's out of memory --- or, worst case, it
crashes trying, in which case the local libpq ought to gin up a report
about loss of connection. So the root cause I'm suspecting is that
the local libpq was unable to obtain memory for a PGresult or something
like that. That theory has some holes of its own, because libpq also
keeps some cards up its sleeve that usually let it report out-of-memory
successfully, but it's the best I can do with the info at hand.
In any case, the point of the error style guidelines is that it's *always*
possible to do better than "unknown error"; now that it's been proven
that this case is reachable in the field, we should try harder.
regards, tom lane
Sent via pgsql-hackers mailing list (firstname.lastname@example.org)
To make changes to your subscription: