Re: "long" type is not appropriate for counting tuples - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: "long" type is not appropriate for counting tuples
Date
Msg-id CAH2-Wzn90Vmpa0fVmerShyTdjCESChrLABRM9+agaAq+pM8taw@mail.gmail.com
Whole thread Raw
In response to Re: "long" type is not appropriate for counting tuples  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Apr 29, 2019 at 10:32 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> There's more to that than you might realize.  For example, guc.c
> enforces a limit on work_mem that's designed to ensure that
> expressions like "work_mem * 1024L" won't overflow, and there are
> similar choices elsewhere.

I was aware of that, but I wasn't aware of how many places that bleeds
into until I checked just now.

It would be nice if we could figure out how to make it obvious that
the idioms around the use of long for work_mem stuff are idioms that
have a specific rationale. It's pretty confusing as things stand.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: "long" type is not appropriate for counting tuples
Next
From: Tom Lane
Date:
Subject: Re: "long" type is not appropriate for counting tuples