Re: Re: [PATCH 3/8] Add support for a generic wal reading facility dubbed XLogReader

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: [PATCH 3/8] Add support for a generic wal reading facility dubbed XLogReader
Дата
Msg-id 23855.1351542693@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCH 3/8] Add support for a generic wal reading facility dubbed XLogReader  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> I think you may have converted some malloc() calls from Andres' patch
> into palloc() -- because you have some palloc() calls which are later
> checked for NULL results, which obviously doesn't make sense.  At the
> same time, if we're going to use malloc() instead of palloc(), we need
> to check for NULL return value in XLogReaderAllocate() callers.  This
> seems easy to fix at first glance, but what is the correct response if
> it fails during StartupXLOG()?  Should we just elog(FATAL) and hope it
> never happens in practice?

Um, surely we can still let those functions use palloc?  It should
just be #define'd as pg_malloc() (ie something with an error exit)
in non-backend contexts.
        regards, tom lane



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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: WIP checksums patch
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Patch für MAP_HUGETLB for mmap() shared memory