Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro

Amul Sul <sulamul@gmail.com>

From: Amul Sul <sulamul@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2023-11-16T06:07:26Z
Lists: pgsql-hackers
On Wed, Nov 15, 2023 at 9:26 PM Nathan Bossart <nathandbossart@gmail.com>
wrote:

> On Wed, Nov 15, 2023 at 09:27:18AM +0530, Amul Sul wrote:
> > Nevermind, I usually use git apply or git am, here are those errors:
> >
> > PG/ - (master) $ git apply
> ~/Downloads/retire_compatibility_macro_v1.patch
> > error: patch failed: src/backend/access/brin/brin.c:297
> > error: src/backend/access/brin/brin.c: patch does not apply
>
> I wonder if your mail client is modifying the patch.  Do you have the same
> issue if you download it from the archives?
>

Yes, you are correct. Surprisingly, the archive version applied cleanly.

Gmail is doing something, I usually use web login on chrome browser,  I
never
faced such issues with other's patches.  Anyway, will try both the versions
next
time for the same kind of issue, sorry for the noise.

Regards,
Amul

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