[HACKERS] ICU non-utf8 code path leaks memory like there's no tomorrow

Поиск
Список
Период
Сортировка
От Tom Lane
Тема [HACKERS] ICU non-utf8 code path leaks memory like there's no tomorrow
Дата
Msg-id 1955.1498181798@sss.pgh.pa.us
обсуждение исходный текст
Список pgsql-hackers
In a database with utf8 encoding, this behaves reasonably:

select count(*) from
(select * from generate_series(1,10000000) xorder by x::text collate "en-x-icu") ss;

It eats circa 25MB, not a lot worse than the libc-collation equivalent.
But try it in say LATIN1, and it eats multiple gigabytes.

I believe the reason is that the code paths in varstr_cmp that make
use of icu_to_uchar() have forgotten to free the palloc'd output
of the latter.  I have not looked to see where else the users of
that and the reverse function made this mistake.
        regards, tom lane



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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: [HACKERS] Multi column range partition table
Следующее
От: Noah Misch
Дата:
Сообщение: Re: [HACKERS] transition table behavior with inheritance appears broken