Skip to content

Commit e4e63cd

Browse files
committed
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
1 parent d212957 commit e4e63cd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/backend/utils/error/elog.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,10 @@ errcode_for_file_access(void)
922922
edata->sqlerrcode = ERRCODE_DISK_FULL;
923923
break;
924924

925+
case ENOMEM: /* Out of memory */
926+
edata->sqlerrcode = ERRCODE_OUT_OF_MEMORY;
927+
break;
928+
925929
case ENFILE: /* File table overflow */
926930
case EMFILE: /* Too many open files */
927931
edata->sqlerrcode = ERRCODE_INSUFFICIENT_RESOURCES;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy