retire MemoryContextResetAndDeleteChildren backwards compatibility macro
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: pgsql-hackers@postgresql.org
Date: 2023-11-13T18:59:50Z
Lists: pgsql-hackers
Attachments
- retire_compatibility_macro_v1.patch (text/x-diff) patch v1
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
Commits
-
Retire MemoryContextResetAndDeleteChildren() macro.
- 6a72c42fd5af 17.0 landed
-
Simplify code by getting rid of SPI_push, SPI_pop, SPI_restore_connection.
- 1833f1a1c3b0 10.0 cited
-
Redefine MemoryContextReset() as deleting, not resetting, child contexts.
- eaa5808e8ec4 9.5.0 cited
-
tuplestore_donestoring() isn't needed anymore, but provide a no-op
- dd04e958c8b0 7.4.1 cited