Re: [PATCHES] putting CHECK_FOR_INTERRUPTS in qsort_comparetup()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCHES] putting CHECK_FOR_INTERRUPTS in qsort_comparetup()
Дата
Msg-id 3410.1152902615@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: [PATCHES] putting CHECK_FOR_INTERRUPTS in qsort_comparetup()  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
"Charles Duffy" <charles.duffy@gmail.com> writes:
> [ CHECK_FOR_INTERRUPTS inside qsort comparison routine ]

It occurs to me that there's a nonzero risk of problems here, because if
the interrupt occurs qsort() will lose control.  I'm wondering whether
there are any implementations of qsort() that allocate memory and then
release it before returning.  If so, interrupting the sort would lead to
memory leaked permanently (till backend exit anyway).

We might have to just tolerate this, but if it occurs on a lot of
platforms I'd have second thoughts about applying the patch.  Anyone
familiar with the internals of glibc's qsort, in particular?

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: src/tools/pginclude considered harmful (was Re: [PATCHES] toast index entries again)
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: contrib promotion?