Re: pgsql: Fix more holes with SLRU code in need of int64 for segment numbe

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Fix more holes with SLRU code in need of int64 for segment numbe
Date: 2024-08-12 21:35:43
Message-ID: CAPpHfduErkbMvdFk94AZTi4t55h-iTYRGfZ8k+9HFZFNpc+Jqw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Fri, Aug 9, 2024 at 4:09 PM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
> On 08.08.24 01:15, Michael Paquier wrote:
> > 
> >> On Aug 8, 2024, at 5:05, Alexander Korotkov <aekorotkov(at)gmail(dot)com> wrote:
> >> On Wed, Aug 7, 2024 at 10:52 PM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
> >>> It looks like the commit I'm talking about here is a subset of v55-0001
> >>> from that thread?
> >>
> >> Yes, looks like this.
> >>
> >>> So why is some of this being committed now into v17?
> >>> But as I wrote above, I think this approach is a bad idea.
> >>
> >> OK, I agree that might look annoying. So, it's better to revert now.
> >> Michael, what do you think?
> >
> > The argument is two-fold here. The point of this change is that we were forcibly doing a cast to int with int64 values returned, so this commit limits the risks of missing paths in the future, while being consistent with all the SLRU code marking segment numbers with int64 for short *and* long segment file names.
>
> No, this is not what *this* patch does. (I suppose some of the related
> patches might be doing that.) This patch just casts a few things that
> are int to unsigned long long int before printing them.

As pointed by Noah Misch [1], unlike the commit the patch [2] also
changed segment-returning functions to return int64. Thus, in the
patch output formats make much more sense, because they match the
input data types. Michael, are you intended to push the remaining
part of the patch [2]?

Links
1. https://www.postgresql.org/message-id/20240810175055.cd.nmisch%40google.com
2. https://www.postgresql.org/message-id/ZqGvzSbW5TGKqZcE%40paquier.xyz

------
Regards,
Alexander Korotkov
Supabase

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2024-08-12 22:18:47 pgsql: Fix creation of partition descriptor during concurrent detach+dr
Previous Message Jeff Davis 2024-08-12 19:47:34 pgsql: Remove unnecessary check for NULL locale, per Coverity.