Re: Use of "long" in incremental sort code - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Use of "long" in incremental sort code
Date
Msg-id CAH2-Wzm8hUwWGb9ojgaMCY4HyzggjdTMcoiQyT2c3Z5mPjQT_g@mail.gmail.com
Whole thread Raw
In response to Re: Use of "long" in incremental sort code  (James Coleman <jtc331@gmail.com>)
List pgsql-hackers
On Thu, Jul 2, 2020 at 12:47 PM James Coleman <jtc331@gmail.com> wrote:
> But wouldn't that mean we'd get int on 32-bit systems, and since we're
> accumulating data we could go over that value in both memory and disk?
>
> My assumption is that it's preferable to have the "this run value" and
> the "total used across multiple runs" and both of those for disk and
> memory to be the same. In that case it seems we want to guarantee
> 64-bits.

I agree. There seems to be little reason to accommodate platform level
conventions, beyond making sure that everything works on less popular
or obsolete platforms.

I suppose that it's a little idiosyncratic to use int64 like this. But
it makes sense, and isn't nearly as ugly as the long thing, so I don't
think that it should really matter.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Use of "long" in incremental sort code
Next
From: Tom Lane
Date:
Subject: Re: Use of "long" in incremental sort code