Re: AllocSetContextCreate changes breake extensions

Chapman Flack <chap@anastigmatix.net>

From: Chapman Flack <chap@anastigmatix.net>
To: Christoph Berg <myon@debian.org>, Andres Freund <andres@anarazel.de>, pgsql-hackers@postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2018-10-12T17:32:33Z
Lists: pgsql-hackers
On 10/12/2018 01:10 PM, Christoph Berg wrote:
> Re: Andres Freund 2018-10-12 
> Andres' idea would enable the old code to continue to work, but
> couldn't we additionally to backpatch the ALLOCSET_*_SIZES macros, so
> the new code works also on old versions that didn't get the new
> AllocSetContextCreate macro?

That's effectively what PL/Java did, just for itself. Was pretty
straightforward.

https://github.com/tada/pljava/commit/3b67999

-Chap


Commits

  1. Back-patch addition of the ALLOCSET_FOO_SIZES macros.

  2. Simplify use of AllocSetContextCreate() wrapper macro.

  3. Rethink MemoryContext creation to improve performance.