From: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
---|---|
To: | Jan de Visser <jan(at)de-visser(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Idea: closing the loop for "pg_ctl reload" |
Date: | 2015-03-02 20:47:04 |
Message-ID: | 2054163505.1329546.1425329224614.JavaMail.yahoo@mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Jan de Visser <jan(at)de-visser(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2015-03-02 20:57:59 | autogenerated column names + views are a dump hazard |
Previous Message | Tom Lane | 2015-03-02 20:38:52 | Re: 32bit OID wrap around concerns |