You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by le...@apache.org on 2026/09/29 13:22:29 UTC
(cloudberry) 39/50: Translate ENOMEM to ERRCODE_OUT_OF_MEMORY in errcode_for_file_access().
This is an automated email from the ASF dual-hosted git repository.
leborchuk pushed a commit to branch REL_2_STABLE
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit dceda47c263a72d6bf54cfa5f499e403b425bdf0
Author: Tom Lane <tg...@sss.pgh.pa.us>
AuthorDate: Fri Feb 2 15:34:29 2024 -0500
Translate ENOMEM to ERRCODE_OUT_OF_MEMORY in errcode_for_file_access().
Previously you got ERRCODE_INTERNAL_ERROR, which seems inappropriate,
especially given that we're trying to avoid emitting that in reachable
cases.
Alexander Kuzmenkov
Discussion: https://postgr.es/m/CALzhyqzgQph0BY8-hFRRGdHhF8CoqmmDHW9S=hMZ-HMzLxRqDQ@mail.gmail.com
(cherry picked from commit 329b9688208e43668b002bcc756b13e1afa75911)
---
src/backend/utils/error/elog.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index 2f78f5750c2..6c8db2ef5fa 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -968,6 +968,10 @@ errcode_for_file_access(void)
edata->sqlerrcode = ERRCODE_DISK_FULL;
break;
+ case ENOMEM: /* Out of memory */
+ edata->sqlerrcode = ERRCODE_OUT_OF_MEMORY;
+ break;
+
case ENFILE: /* File table overflow */
case EMFILE: /* Too many open files */
edata->sqlerrcode = ERRCODE_INSUFFICIENT_RESOURCES;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org