Re: Remove unneeded cast in heap_xlog_lock.
Chao Li <li.evan.chao@gmail.com>
From: Chao Li <li.evan.chao@gmail.com>
To: Kirill Reshke <reshkekirill@gmail.com>
Cc: Richard Guo <guofenglinux@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-08-22T10:25:38Z
Lists: pgsql-hackers
> On Aug 22, 2025, at 13:36, Kirill Reshke <reshkekirill@gmail.com> wrote: > > > I do not insist on this modification. I just spotted two completely > same codes in [0] & [1], which only differ in BufferGetPage cast. And > I merely tried to do something with it. > > v2 attached with all 69 casts removed, but I see there is a little > chance of this committed. > > [0] https://github.com/postgres/postgres/blob/13b935c/src/backend/access/heap/heapam_xlog.c#L1007-L1050 > [1] https://github.com/postgres/postgres/blob/13b935c/src/backend/access/heap/heapam_xlog.c#L1083-L1121 > > -- > Best regards, > Kirill Reshke > <v2-0001-Remove-unneeded-cast-in-BufferGetPage.patch> As there are only 76 occurrences, I think using one commit to clean up the unnecessary cast is worthwhile. -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/
Commits
-
Remove unneeded casts of BufferGetPage() result
- 710e6c4301ee 19 (unreleased) landed