Re: DBT-3 with SF=20 got failed

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: DBT-3 with SF=20 got failed
Дата
Msg-id 5579A555.1060604@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: DBT-3 with SF=20 got failed  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

On 06/11/15 16:54, Tom Lane wrote:
> Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
>> Interestingly, the hash code checks for INT_MAX overflows on a number of
>> places, but does not check for this ...
>
> Yeah, and at least at one time there were checks to prevent the hash
> table request from exceeding MaxAllocSize. Did those get removed by
> somebody?

I think the problem is in this piece of code:
  if ((hashtable->nbatch == 1) &&      (hashtable->nbuckets_optimal <= INT_MAX / 2) &&       /* overflow protection */
   (ntuples >= (hashtable->nbuckets_optimal * NTUP_PER_BUCKET)))      {          hashtable->nbuckets_optimal *= 2;
   hashtable->log2_nbuckets_optimal += 1;      }
 

ISTM it does not check against the max_pointers (that's only done in 
ExecChooseHashTableSize).



--
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: 9.5 release notes
Следующее
От: Dave Page
Дата:
Сообщение: Re: The purpose of the core team