Correct SQLSTATE for ENOMEM in file access

From: Alexander Kuzmenkov <akuzmenkov(at)timescale(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Correct SQLSTATE for ENOMEM in file access
Date: 2024-02-02 19:02:37
Message-ID: CALzhyqzgQph0BY8-hFRRGdHhF8CoqmmDHW9S=hMZ-HMzLxRqDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

---
Alexander Kuzmenkov
Timescale

Attachment Content-Type Size
enomem-sqlstate-v1.patch text/x-patch 542 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alena Rybakina 2024-02-02 19:06:17 Re: POC, WIP: OR-clause support for indexes
Previous Message Tom Lane 2024-02-02 18:16:21 Re: pg_language(langispl) column apparently not needed