Re: add missing errdetail for xlogreader allocation failure error

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: add missing errdetail for xlogreader allocation failure error
Date: 2021-11-22 16:50:00
Message-ID: 202111221650.fvoy3ebisb3d@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021-Nov-19, Bharath Rupireddy wrote:

> It seems like some of the XLogReaderAllocate failure check errors are
> not having errdetail "Failed while allocating a WAL reading
> processor." but just the errmsg "out of memory". The "out of memory"
> message without the errdetail is too generic and let's add it for
> consistency and readability of the message in the server logs.
>
> Here's a tiny patch. Thoughts?

You're right -- and since in a few other callers of XLogReaderAllocate
we do include the exact errdetail you propose, your patch looks good to
me.

While looking I noticed a few other places that could be improved similarly. I
crammed it all in a single commit, and pushed.

Thank you,

--
Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-11-22 16:53:59 Re: Building postgresql armv7 on emulated x86_64
Previous Message Chapman Flack 2021-11-22 16:37:53 Re: Is a function to a 1-component record type undeclarable?