On 22.08.22 20:30, Tom Lane wrote:
I'm not very convinced that the benefits of making pfree() more
like free() are worth those costs.
We could ameliorate the first objection if we wanted to back-patch
0002, I guess.
(FWIW, no objection to your 0001. 0004 and 0005 seem okay too;
they don't
On Wed, 24 Aug 2022 at 23:07, David Rowley wrote:
> One counter argument to that is for cases like list_free_deep().
> Right now if I'm not mistaken there's a bug (which I just noticed) in
> list_free_private() that would trigger if you have a List of Lists and
> one of the inner Lists is NIL.
On Tue, 23 Aug 2022 at 13:17, David Rowley wrote:
> I think making pfree() accept NULL is a bad idea.
One counter argument to that is for cases like list_free_deep().
Right now if I'm not mistaken there's a bug (which I just noticed) in
list_free_private() that would trigger if you have a List
On Tue, 23 Aug 2022 at 06:30, Tom Lane wrote:
>
> Peter Eisentraut writes:
> > Per discussion in [0], here is a patch set that allows pfree() to accept
> > a NULL argument, like free() does.
>
> So the question is, is this actually a good thing to do?
I think making pfree() accept NULL is a bad
>Per discussion in [0], here is a patch set that allows pfree() to accept
>a NULL argument, like free() does.
>Also, a patch that removes the now-unnecessary null pointer checks
>before calling pfree(). And a few patches that do the same for some
>other functions that I found around. (The one
Hi,
On 2022-08-22 14:30:22 -0400, Tom Lane wrote:
> Peter Eisentraut writes:
> > Per discussion in [0], here is a patch set that allows pfree() to accept
> > a NULL argument, like free() does.
>
> So the question is, is this actually a good thing to do?
>
> If we were starting in a green field,
Peter Eisentraut writes:
> Per discussion in [0], here is a patch set that allows pfree() to accept
> a NULL argument, like free() does.
So the question is, is this actually a good thing to do?
If we were starting in a green field, I'd be fine with defining
pfree(NULL) as okay. But we're not,
2 Aug 2022 16:51:52 +0200
Subject: [PATCH 2/5] Change pfree to accept NULL argument
---
src/backend/utils/mmgr/README | 6 +-
src/backend/utils/mmgr/mcxt.c | 7 ++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/backend/utils/mmgr/README b/src/backend/utils/mmgr/README
index