[HACKERS] Ilegal type cast in _hash_doinsert()

Поиск
Список
Период
Сортировка
От Mithun Cy
Тема [HACKERS] Ilegal type cast in _hash_doinsert()
Дата
Msg-id CAD__OujahZkBC89v=KoYp3n72Gb4SGJMoYj83S7OTWEv2OUO+Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: [HACKERS] Ilegal type cast in _hash_doinsert()  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
There seems to be some base bug in _hash_doinsert().
+    * XXX this is useless code if we are only storing hash keys.

+   */

+    if (itemsz > HashMaxItemSize((Page) metap))

+        ereport(ERROR,

+                (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),

+                 errmsg("index row size %zu exceeds hash maximum %zu",

+                        itemsz, HashMaxItemSize((Page) metap)),

+           errhint("Values larger than a buffer page cannot be indexed.")));

 "metap" (HashMetaPage) is not a Page (they the entirely different structure), so above casting is not legal. Added a patch to correct same by passing actual Page which stores "HashMetaPage".


--
Thanks and Regards
Mithun C Y

Вложения

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

Предыдущее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: [HACKERS] BUG: pg_stat_statements query normalization issueswith combined queries
Следующее
От: Michael Meskes
Дата:
Сообщение: Re: [HACKERS] [bug fix] Trivial ecpg bug which can cause memoryoverrun