Re: PLy_malloc and plperl mallocs

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PLy_malloc and plperl mallocs
Дата
Msg-id 8580.1290914890@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PLy_malloc and plperl mallocs  (Jan Urbański <wulczer@wulczer.org>)
Ответы Re: PLy_malloc and plperl mallocs  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Jan Urbański <wulczer@wulczer.org> writes:
> I noticed that PL/Python uses a simple wrapper around malloc that does
> ereport(FATAL) if malloc returns NULL. I find it a bit harsh, don't we
> normally do ERROR if we run out of memory?

> And while looking at how PL/Perl does these things I find that one
> failed malloc (in compile_plperl_function) throws an ERROR, and the rest
> (in plperl_spi_prepare) are simply unguarded...

> I guess PL/Python should stop throwing FATAL errors and PL/Perl should
> get its own malloc_or_ERROR helper and start using that.

The real question is why they're not using palloc instead.
        regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Report: Linux huge pages with Postgres
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: profiling connection overhead