retire MemoryContextResetAndDeleteChildren backwards compatibility macro

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: retire MemoryContextResetAndDeleteChildren backwards compatibility macro
Date: 2023-11-13 18:59:50
Message-ID: 20231113185950.GA1668018@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I just found myself researching the difference between MemoryContextReset()
and MemoryContextResetAndDeleteChildren(), and it turns out that as of
commit eaa5808 (2015), there is none.
MemoryContextResetAndDeleteChildren() is just a backwards compatibility
macro for MemoryContextReset(). I found this surprising because it sounds
like they do very different things.

Shall we retire this backwards compatibility macro at this point? A search
of https://codesearch.debian.net/ does reveal a few external uses, so we
could alternatively leave it around and just update Postgres to stop using
it, but I don't think it would be too burdensome for extension authors to
fix if we removed it completely.

Patch attached.

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
retire_compatibility_macro_v1.patch text/x-diff 12.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2023-11-13 19:05:23 Re: Question about non-blocking mode in libpq
Previous Message Tom Lane 2023-11-13 18:23:30 Re: Cleaning up array_in()