Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro

Alvaro Herrera <alvherre@alvh.no-ip.org>

From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2023-11-14T16:20:16Z
Lists: pgsql-hackers
On 2023-Nov-13, Nathan Bossart wrote:

> 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.

Let's leave the macro around and just remove its uses in PGDG-owned
code.  Having the macro around hurts nothing, and we can remove it in 15
years or so.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Entristecido, Wutra                     (canción de Las Barreras)
echa a Freyr a rodar
y a nosotros al mar"



Commits

  1. Retire MemoryContextResetAndDeleteChildren() macro.

  2. Simplify code by getting rid of SPI_push, SPI_pop, SPI_restore_connection.

  3. Redefine MemoryContextReset() as deleting, not resetting, child contexts.

  4. tuplestore_donestoring() isn't needed anymore, but provide a no-op