Re: [BUGS] BUG #14654: With high statistics targets on ts_vector, unexpectedly high memory use & OOM are triggered

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [BUGS] BUG #14654: With high statistics targets on ts_vector, unexpectedly high memory use & OOM are triggered
Дата
Msg-id 4427.1499873459@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #14654: With high statistics targets on ts_vector,unexpectedly high memory use & OOM are triggered  (Heikki Linnakangas <hlinnaka@iki.fi>)
Ответы Re: [BUGS] BUG #14654: With high statistics targets on ts_vector,unexpectedly high memory use & OOM are triggered  (Heikki Linnakangas <hlinnaka@iki.fi>)
Список pgsql-bugs
Heikki Linnakangas <hlinnaka@iki.fi> writes:
> Yes, I can see that happening here too. The problem seems to be that the 
> analyze-function detoasts every row in the sample. Tsvectors can be very 
> large, so it adds up.

> That's pretty easy to fix, the analyze function needs to free the 
> detoasted copies as it goes. But in order to do that, it needs to make 
> copies of all the lexemes stored in the hash table, instead of pointing 
> directly to the detoasted copies.

> Patch attached. I think this counts as a bug, and we should backport this.

+1.  I didn't test the patch, but it looks sane to the eyeball.
        regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: [BUGS] BUG #14722: Segfault in tuplesort_heap_siftup, 32 bitoverflow
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] BUG #14722: Segfault in tuplesort_heap_siftup, 32 bit overflow