Re: fix a bogus line in dynahash.c

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: fix a bogus line in dynahash.c
Дата
Msg-id 4293EC08.5080304@samurai.com
обсуждение исходный текст
Ответ на Re: fix a bogus line in dynahash.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: fix a bogus line in dynahash.c
Список pgsql-patches
Tom Lane wrote:
> That test is a no-op in the case where hashp->alloc in fact points to
> palloc.  But it doesn't always point there --- see shmem_alloc.

Perhaps it would be a net win to change ShmemAlloc() to elog(ERROR) on
out-of-memory? A fair few of the ShmemAlloc() call sites don't bother to
check the return value anyway, and a few more just elog(ERROR). For the
few cases when we do need to do some cleanup, PG_TRY() could be used, or
we could just provide a variant of ShmemAlloc() that returns NULL on OOM
and could be used when error recovery is required.

-Neil

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: fix a bogus line in dynahash.c
Следующее
От: "Qingqing Zhou"
Дата:
Сообщение: Re: fix a bogus line in dynahash.c