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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, 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-07 23:15:44
Message-ID: 7AD52B27-1F6A-4F1B-9420-8C11ADAC6343@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers


> 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.

So at the end, I’d rather let the code as it is now, and keep a line of marking all the segment numbers with int64 and be consistent with what all the SLRU internals think what segment numbers should be. This is also the argument of Noah’s upthread as far as I understand (Noah, feel free to correct me if you think differently).

(I’m without laptop access for quite a few days)
--
Michael

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Pavel Stehule 2024-08-08 04:44:31 Re: pgsql: Introduce hash_search_with_hash_value() function
Previous Message Alexander Korotkov 2024-08-07 20:25:12 Re: pgsql: Introduce hash_search_with_hash_value() function