Re:Re: [PATCH]A minor improvement to the error-report in SimpleLruWriteAll()

From: "Long Song" <songlong88(at)126(dot)com>
To: "Kyotaro Horiguchi" <horikyota(dot)ntt(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re:Re: [PATCH]A minor improvement to the error-report in SimpleLruWriteAll()
Date: 2024-06-05 08:30:44
Message-ID: 3b31117.83a0.18fe7859c95.Coremail.songlong88@126.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
I modified the patch, kept the old call of SlruReportIOError()
outside the for-loop, and add a call of erport() with LOG level
when file-close failure occurs in the for-loop.

Please check whether this modification is appropriate
and let me know if there is any problem. Thank you.

At 2024-06-04 14:44:09, "Kyotaro Horiguchi" <horikyota(dot)ntt(at)gmail(dot)com> wrote:
>At Tue, 28 May 2024 20:15:59 +0800 (CST), "Long Song" <songlong88(at)126(dot)com> wrote in
>>
>> Hi,
>> Actually, I still wonder why only the error message
>> of the last failure to close the file was recorded.
>> For this unusual situation, it is acceptable to
>> record all failure information without causing
>> too much logging.
>> Was it designed that way on purpose?
>
>Note that SlruReportIOError() causes a non-local exit. To me, the
>point of the loop seems to be that we want to close every single file,
>apart from the failed ones. From that perspective, the patch disrupts
>that intended behavior by exiting in the middle of the loop. It seems
>we didn't want to bother collecting errors for every failed file in
>that part.
>
>regards.
>
>--
>Kyotaro Horiguchi
>NTT Open Source Software Center

--
Best Regards,

Long

Attachment Content-Type Size
v2-0001-Fix-error-report-missing-in-SimpleLruWriteAll.patch application/octet-stream 1.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2024-06-05 08:41:36 Re: Logical Replication of sequences
Previous Message Andreas Karlsson 2024-06-05 08:19:01 Should we move the resowner field from JitContext to LLVMJitContext?