Re: Correct SQLSTATE for ENOMEM in file access - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Correct SQLSTATE for ENOMEM in file access
Date
Msg-id 3229197.1706901133@sss.pgh.pa.us
Whole thread Raw
In response to Correct SQLSTATE for ENOMEM in file access  (Alexander Kuzmenkov <akuzmenkov@timescale.com>)
Responses Re: Correct SQLSTATE for ENOMEM in file access
List pgsql-hackers
Alexander Kuzmenkov <akuzmenkov@timescale.com> 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



pgsql-hackers by date:

Previous
From: Alena Rybakina
Date:
Subject: Re: POC, WIP: OR-clause support for indexes
Next
From: Alexander Kuzmenkov
Date:
Subject: Re: Correct SQLSTATE for ENOMEM in file access