Re: Fix bogus use of "long" in aset.c

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix bogus use of "long" in aset.c
Date: 2025-10-29 23:40:54
Message-ID: aQKmBj2XzR3_hlER@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 30, 2025 at 12:07:08PM +1300, David Rowley wrote:
> It turns out that AllocSetCheck() thinks "long" is a good datatype to
> store the difference between 2 pointers. That's not going to work well
> on 64-bit Windows as long is 32-bit.

Nice find. Your suggestion of using Size makes sense here, also for
your consistency argument.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-10-29 23:52:11 Re: abi-compliance-check failure due to recent changes to pg_{clear,restore}_{attribute,relation}_stats()
Previous Message Masahiko Sawada 2025-10-29 23:39:31 Re: Add mode column to pg_stat_progress_vacuum