Re: Plain strdup() in frontend code

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Plain strdup() in frontend code
Дата
Msg-id 20190430012351.GA2762@paquier.xyz
обсуждение исходный текст
Ответ на Re: Plain strdup() in frontend code  (Daniel Gustafsson <daniel@yesql.se>)
Ответы Re: Plain strdup() in frontend code  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Mon, Apr 29, 2019 at 01:35:12PM +0000, Daniel Gustafsson wrote:
> Good point, I've updated the patch to include those as well.

I have been reviewing this patch, and the change in pg_waldump is
actually a good thing, as we could finish with a crash if strdup()
returns NULL as the pointer gets directly used, and there would be an
assertion failure in open_file_in_directory().

parseAclItem() in dumputils.c gets changed so as we would not return
false on OOM anymore.  I think that the current code is a bug as
parseAclItem() should return false to the caller only on a parsing
error so the caller can get confused between the OOM on strdup() and a
parsing problem.

In short, as presented, the patch looks acceptable to me.  Are there
any objections to apply it on HEAD?
--
Michael

Вложения

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

Предыдущее
От: Ashwin Agrawal
Дата:
Сообщение: Re: Pluggable Storage - Andres's take
Следующее
От: David Rowley
Дата:
Сообщение: Re: Caveats from reloption toast_tuple_target