public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Alexander Kuzmenkov <[email protected]>
Cc: [email protected]
Subject: Re: Correct SQLSTATE for ENOMEM in file access
Date: Fri, 02 Feb 2024 14:12:13 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <CALzhyqzgQph0BY8-hFRRGdHhF8CoqmmDHW9S=hMZ-HMzLxRqDQ@mail.gmail.com>
References: <CALzhyqzgQph0BY8-hFRRGdHhF8CoqmmDHW9S=hMZ-HMzLxRqDQ@mail.gmail.com>

Alexander Kuzmenkov <[email protected]> writes:
> Looking through the logs of some server that were experiencing out of
> memory errors, I noticed that errcode_for_file_access() reports
> ERRCODE_INTERNAL_ERROR for ENOMEM, while the correct SQLSTATE for this
> should probably be ERRCODE_OUT_OF_MEMORY. Attached is a small patch to
> fix this.

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.

			regards, tom lane






view thread (3+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Correct SQLSTATE for ENOMEM in file access
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox