| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
| Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: how to correctly react on exception in pfree function? |
| Date: | 2022-10-13 03:34:32 |
| Message-ID: | 890991.1665632072@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Julien Rouhaud <rjuju123(at)gmail(dot)com> writes:
> On Wed, Oct 12, 2022 at 11:08:25PM -0400, Tom Lane wrote:
>> It may be worth looking at the GUC code, which has been dealing
>> with the same sorts of issues pretty successfully for many years.
> The GUC code relies on malloc/free,
Not for much longer [1]. And no, I don't believe that that patch
makes any noticeable difference in the code's robustness.
In the end, a bug affecting these considerations is a bug to be fixed
once it's found. Building potentially-themselves-buggy defenses against
hypothetical bugs is an exercise with rapidly diminishing returns.
regards, tom lane
[1] https://www.postgresql.org/message-id/flat/2982579(dot)1662416866(at)sss(dot)pgh(dot)pa(dot)us
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Richard Guo | 2022-10-13 03:39:50 | Re: Use LIMIT instead of Unique for DISTINCT when all distinct pathkeys are redundant |
| Previous Message | Julien Rouhaud | 2022-10-13 03:26:02 | Re: how to correctly react on exception in pfree function? |