Re: Removing "long int"-related limit on hash table sizes

Ranier Vilela <ranier.vf@gmail.com>

From: Ranier Vilela <ranier.vf@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>, Thomas Munro <thomas.munro@gmail.com>, Jeff Davis <pgsql@j-davis.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-07-25T17:19:26Z
Lists: pgsql-hackers
Em dom., 25 de jul. de 2021 às 13:28, Tom Lane <tgl@sss.pgh.pa.us> escreveu:

> Andres Freund <andres@anarazel.de> writes:
> > On 2021-07-23 17:15:24 -0400, Tom Lane wrote:
> >> That's because they spill to disk where they did not before.  The easy
> >> answer of "raise hash_mem_multiplier" doesn't help, because on Windows
> >> the product of work_mem and hash_mem_multiplier is clamped to 2GB,
> >> thanks to the ancient decision to do a lot of memory-space-related
> >> calculations in "long int", which is only 32 bits on Win64.
>
> > We really ought to just remove every single use of long.
>
> I have no objection to that as a long-term goal.  But I'm not volunteering
> to do all the work, and in any case it wouldn't be a back-patchable fix.
>
I'm a volunteer, if you want to work together.
I think int64 is in most cases the counterpart of *long* on Windows.

regards,
Ranier Vilela

Commits

  1. Get rid of artificial restriction on hash table sizes on Windows.