Re: [HACKERS] Should logtape.c blocks be of type long?

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: [HACKERS] Should logtape.c blocks be of type long?
Дата
Msg-id CAH2-Wz=6ccFecUSuYSi1g3FD_n4_JmMcEXRaX3E8f1xuAoxttg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Should logtape.c blocks be of type long?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Should logtape.c blocks be of type long?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, Feb 26, 2017 at 9:07 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 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.)

I'm glad that you pointed out the history with work_mem calculations
specifically, since I have found this confusing in the past. I was
about to ask "what about 64-bit Windows?", but then remembered that we
don't actually support large allocations on that platform (this is why
MAX_KILOBYTES exists).

> 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.

As things stand, a 64-bit windows installation would have any CLUSTER
of a table that exceeds 16TiB fail, possibly pretty horribly (I
haven't thought through the consequences much). This is made more
likely by the fact that we've made tuplesort faster in the past few
releases (gains which the MAX_KILOBYTES restriction won't impinge on
too much, particularly in Postgres 10). I find that unacceptable, at
least for Postgres 10.

-- 
Peter Geoghegan



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Parallel Append implementation
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] error detail when partition not found