Re: Remove unneeded cast in heap_xlog_lock. - Mailing list pgsql-hackers

From Richard Guo
Subject Re: Remove unneeded cast in heap_xlog_lock.
Date
Msg-id CAMbWs49fO0ihKZdXg6mzW3jsfQiWj011rn+iSgjV6ZEmFVqJWA@mail.gmail.com
Whole thread Raw
In response to Re: Remove unneeded cast in heap_xlog_lock.  (Álvaro Herrera <alvherre@kurilemu.de>)
List pgsql-hackers
On Fri, Aug 22, 2025 at 6:59 PM Álvaro Herrera <alvherre@kurilemu.de> wrote:
> On 2025-Aug-22, Kirill Reshke wrote:
> > I am uncertain about the delineation between when we make changes and
> > when we refrain from doing so.

> I think this is natural work after 9c727360bcc7, before which
> BufferGetPage() was a macro and strangely enough had its own cast
> embedded.  As I understand, the less casts we have, the better.  There's
> some other standardization work going on to remove unnecessary casts
> elsewhere, so I'm not sure why we wouldn't do this.

I don't have a strong opinion on whether we should do this cleanup or
not.  I'm a bit concerned about the code churn, given that there are
69 instances spread across 22 files.  But maybe I'm worrying over
nothing, as we've done similar cleanups before to remove unnecessary
casts.

Thanks
Richard



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: vacuumdb --missing-stats-only and permission issue
Next
From: Nathan Bossart
Date:
Subject: Re: Don't treat virtual generated columns as missing statistics in vacuumdb --missing-stats-only