Content-Length: 262025 | pFad | http://github.com/postgrespro/postgres/commit/e4e63cd9863480698ef97009f132c9854cce8407

C4 Translate ENOMEM to ERRCODE_OUT_OF_MEMORY in errcode_for_file_access(). · postgrespro/postgres@e4e63cd · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/e4e63cd9863480698ef97009f132c9854cce8407

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy