Re: Idea: closing the loop for "pg_ctl reload"

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Idea: closing the loop for "pg_ctl reload"
Дата
Msg-id 2054163505.1329546.1425329224614.JavaMail.yahoo@mail.yahoo.com
обсуждение исходный текст
Ответ на Re: Idea: closing the loop for "pg_ctl reload"  (Jan de Visser <jan@de-visser.net>)
Список pgsql-hackers
Jan de Visser <jan@de-visser.net> wrote:
> On March 2, 2015 09:50:49 AM Tom Lane wrote:
>> However, you could and should use pg_malloc0, which takes care
>> of that for you...
>
> I am (using pg_malloc, that is). So, just to be sure: pg_malloc
> memsets the block to 0, right?

I think you may have misread a zero character as an empty pair of
parentheses.  Tom pointed out that the pg_malloc() function gives
you uninitialized memory -- you cannot count on the contents.  He
further pointed out that if you need it to be initialized to '0'
bytes you should call the pg_malloc0() function rather than calling
the pg_malloc() function and running memset separately.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 32bit OID wrap around concerns
Следующее
От: Andres Freund
Дата:
Сообщение: autogenerated column names + views are a dump hazard