From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Bossart, Nathan" <bossartn(at)amazon(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Peter Geoghegan <pg(at)bowt(dot)ie> |
Subject: | Re: Out-of-memory error reports in libpq |
Date: | 2021-07-28 03:32:53 |
Message-ID: | YQDP5RAT+OPQ7E3p@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jul 27, 2021 at 10:31:25PM -0400, Tom Lane wrote:
> 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.
I don't mind either that this removes a bit of context. For
unlikely-going-to-happen errors that's not worth the extra translation
cost. No objections from me for an integration into 14 as that's
straight-forward, and that would minimize conflicts between HEAD and
14 in the event of a back-patch
+pqReportOOM(PGconn *conn)
+{
+ pqReportOOMBuffer(&conn->errorMessage);
+}
+
+/*
+ * As above, but work with a bare error-message-buffer pointer.
+ */
+void
+pqReportOOMBuffer(PQExpBuffer errorMessage)
+{
Not much a fan of having two routines to do this job though. I would
vote for keeping the one named pqReportOOM() with PQExpBuffer as
argument.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2021-07-28 03:40:59 | Re: alter table set TABLE ACCESS METHOD |
Previous Message | Michael Paquier | 2021-07-28 03:23:44 | Re: alter table set TABLE ACCESS METHOD |