Retire MemoryContextResetAndDeleteChildren() macro.
authorNathan Bossart <nathan@postgresql.org>
Wed, 15 Nov 2023 19:42:30 +0000 (13:42 -0600)
committerNathan Bossart <nathan@postgresql.org>
Wed, 15 Nov 2023 19:42:30 +0000 (13:42 -0600)
commit6a72c42fd5af7ada49584694f543eb06dddb4a87
treec2f566a161756b8aca8a58d58d4b0a0b6ee08da7
parent83267b15bf0dffa6e1096608bda95b8488048bb9
Retire MemoryContextResetAndDeleteChildren() macro.

As of commit eaa5808e8e, MemoryContextResetAndDeleteChildren() is
just a backwards compatibility macro for MemoryContextReset().  Now
that some time has passed, this macro seems more likely to create
confusion.

This commit removes the macro and replaces all remaining uses with
calls to MemoryContextReset().  Any third-party code that use this
macro will need to be adjusted to call MemoryContextReset()
instead.  Since the two have behaved the same way since v9.5, such
adjustments won't produce any behavior changes for all
currently-supported versions of PostgreSQL.

Reviewed-by: Amul Sul, Tom Lane, Alvaro Herrera, Dagfinn Ilmari Mannsåker
Discussion: https://postgr.es/m/20231113185950.GA1668018%40nathanxps13
18 files changed:
src/backend/access/brin/brin.c
src/backend/access/gin/ginscan.c
src/backend/access/transam/xact.c
src/backend/commands/analyze.c
src/backend/executor/nodeRecursiveunion.c
src/backend/executor/nodeSetOp.c
src/backend/executor/nodeWindowAgg.c
src/backend/executor/spi.c
src/backend/postmaster/autovacuum.c
src/backend/postmaster/bgwriter.c
src/backend/postmaster/checkpointer.c
src/backend/postmaster/walwriter.c
src/backend/replication/logical/worker.c
src/backend/statistics/extended_stats.c
src/backend/tcop/postgres.c
src/backend/utils/cache/evtcache.c
src/backend/utils/error/elog.c
src/include/utils/memutils.h