Peter Geoghegan <pg@bowt.ie> writes:
> logtape.c stores block numbers on disk. These block numbers are
> represented in memory as being of type long.
Yeah. This code is far older than our willingness to assume that every
platform can support int64, and I'm pretty sure that use of "long" was
just a compromise to get the widest values we could use portably and
without a lot of notational hassle. (There are some similar choices in
the area of memory usage, particularly calculations related to work_mem.)
Having said that, I'm not sure it's worth the trouble of changing.
The platforms where there's a difference are probably not muscular
enough that anyone would ever get past 16TB in a temp file anyhow.
regards, tom lane