From: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
---|---|
To: | Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: jsonapi: scary new warnings with LTO enabled |
Date: | 2025-04-21 18:20:00 |
Message-ID: | E4E01D53-5E8C-4D93-85A8-633E93D0A194@yesql.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On 21 Apr 2025, at 17:33, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com> wrote:
>
> On Sat, Apr 19, 2025 at 2:15 PM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>> Since there is no way to determine if the allocation succeeded from outside of
>> the JSON api it might be better to keep the calloc and explicitly free it?
>
> I don't think so; pg_parse_json() will error out quickly, so I don't
> see much advantage to the extra code. Raw performance isn't much of a
> concern for the out-of-memory case, IMO.
Sure, but I fear we'll get an endless stream of static analysis reports for the
allocation leaking if we don't free it.
--
Daniel Gustafsson
From | Date | Subject | |
---|---|---|---|
Next Message | Jacob Champion | 2025-04-21 18:28:43 | Re: jsonapi: scary new warnings with LTO enabled |
Previous Message | Masahiko Sawada | 2025-04-21 17:31:03 | Re: POC: enable logical decoding when wal_level = 'replica' without a server restart |