pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Retire MemoryContextResetAndDeleteChildren() macro.
Date: Wed, 15 Nov 2023 19:44:00 +0000
Message-ID: <E1r3Lns-005c4z-4F@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6a72c42fd5af7ada49584694f543eb06dddb4a87

Modified Files
--------------
src/backend/access/brin/brin.c            |  4 ++--
src/backend/access/gin/ginscan.c          |  2 +-
src/backend/access/transam/xact.c         |  4 ++--
src/backend/commands/analyze.c            |  6 +++---
src/backend/executor/nodeRecursiveunion.c |  2 +-
src/backend/executor/nodeSetOp.c          |  2 +-
src/backend/executor/nodeWindowAgg.c      | 10 +++++-----
src/backend/executor/spi.c                |  4 ++--
src/backend/postmaster/autovacuum.c       | 10 +++++-----
src/backend/postmaster/bgwriter.c         |  2 +-
src/backend/postmaster/checkpointer.c     |  2 +-
src/backend/postmaster/walwriter.c        |  2 +-
src/backend/replication/logical/worker.c  |  2 +-
src/backend/statistics/extended_stats.c   |  2 +-
src/backend/tcop/postgres.c               |  2 +-
src/backend/utils/cache/evtcache.c        |  4 ++--
src/backend/utils/error/elog.c            |  2 +-
src/include/utils/memutils.h              |  3 ---
18 files changed, 31 insertions(+), 34 deletions(-)



Message-ID: <E1r3Lns-005c4z-4F@gemulon.postgresql.org>
Permalink:  ../E1r3Lns-005c4z-4F@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1r3Lns-005c4z-4F@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: nathan@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Retire MemoryContextResetAndDeleteChildren() macro.
  In-Reply-To: <E1r3Lns-005c4z-4F@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox