Re: Switch buffile.c/h to use pgoff_t - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Switch buffile.c/h to use pgoff_t
Date
Msg-id aUuE-hAC1qPAnH75@paquier.xyz
Whole thread Raw
In response to Re: Switch buffile.c/h to use pgoff_t  (Chao Li <li.evan.chao@gmail.com>)
Responses Re: Switch buffile.c/h to use pgoff_t
List pgsql-hackers
On Tue, Dec 23, 2025 at 10:59:45AM +0800, Chao Li wrote:
> I’ve attached a small patch along these lines. It compiles without
> warnings, and "make check" passes on my side. What do you think?

I don't think it is right.  bytestowrite is not a file offset, and the
code has been using an int due to BufFile->nbytes.  This leads to a
more confusing result.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Startup PANIC on standby promotion due to zero-filled WAL segment
Next
From: Michael Paquier
Date:
Subject: Re: correct a word