Re: Out-of-memory error reports in libpq - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Out-of-memory error reports in libpq
Date
Msg-id 541423.1627439485@sss.pgh.pa.us
Whole thread Raw
In response to Re: Out-of-memory error reports in libpq  ("Bossart, Nathan" <bossartn@amazon.com>)
Responses Re: Out-of-memory error reports in libpq  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
"Bossart, Nathan" <bossartn@amazon.com> writes:
> -            appendPQExpBuffer(&conn->errorMessage,
> -                              libpq_gettext("out of memory allocating GSSAPI buffer (%d)\n"),
> -                              payloadlen);
> +            pqReportOOM(conn);

> I see that some context is lost in a few places (e.g., the one above
> points to a GSSAPI buffer).  Perhaps this extra context could be
> useful to identify problematic areas, but it might be unlikely to help
> much in these parts of libpq.  In any case, the vast majority of
> existing callers don't provide any extra context.

Yeah, there are half a dozen places that currently print something
more specific than "out of memory".  I judged that the value of this
was not worth the complexity it'd add to support it in this scheme.
Different opinions welcome of course.

            regards, tom lane



pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: Slim down integer formatting
Next
From: David Rowley
Date:
Subject: Re: Slim down integer formatting