Re: Correct SQLSTATE for ENOMEM in file access
Alexander Kuzmenkov <akuzmenkov@timescale.com>
From: Alexander Kuzmenkov <akuzmenkov@timescale.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Date: 2024-02-02T19:28:39Z
Lists: pgsql-hackers
On Fri, Feb 2, 2024 at 8:12 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Hmm, do you think this is actually reachable? AFAIK we should only be > calling errcode_for_file_access() after functions that are unlikely to > report ENOMEM. It's reachable, that's how I noticed. I'm seeing logs like "XX000: could not load library \"/usr/lib/postgresql/15/lib/plpgsql.so\": out of memory" from internal_load_library and so on. Not sure what is the exact configuration required to reproduce this, probably at least the overcommit should be disabled.
Commits
-
Translate ENOMEM to ERRCODE_OUT_OF_MEMORY in errcode_for_file_access().
- e4e63cd98634 17.0 landed
- a15378100fae 16.2 landed
- 4493bfb709ae 12.18 landed
- 3766b8b64e1c 15.6 landed
- 329b9688208e 14.11 landed
- 29df29dad772 13.14 landed