Re: [HACKERS] Should logtape.c blocks be of type long? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Should logtape.c blocks be of type long?
Date
Msg-id 11844.1488128865@sss.pgh.pa.us
Whole thread Raw
In response to [HACKERS] Should logtape.c blocks be of type long?  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: [HACKERS] Should logtape.c blocks be of type long?  (Peter Geoghegan <pg@bowt.ie>)
Re: [HACKERS] Should logtape.c blocks be of type long?  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] [patch] reorder tablespaces in basebackup tar streamfor backup_label
Next
From: Michael Banck
Date:
Subject: Re: [HACKERS] [patch] reorder tablespaces in basebackup tar streamfor backup_label