pgsql: Get rid of copy_partition_key - Mailing list pgsql-committers

From Alvaro Herrera
Subject pgsql: Get rid of copy_partition_key
Date
Msg-id E1eS4sE-0006Ba-1G@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Get rid of copy_partition_key

That function currently exists to avoid leaking memory in
CacheMemoryContext in case of trouble while the partition key is being
built, but there's a better way: allocate everything in a memcxt that
goes away if the current (sub)transaction fails, and once the partition
key is built and no further errors can occur, make the memcxt permanent
by making it a child of CacheMemoryContext.

Reviewed-by: Tom Lane
Discussion: https://postgr.es/m/20171027172730.eh2domlkpn4ja62m@alvherre.pgsql

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8a0596cb656e357c391cccf12854beb2e05f3901

Modified Files
--------------
src/backend/utils/cache/relcache.c | 71 +++++---------------------------------
1 file changed, 9 insertions(+), 62 deletions(-)


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Fix typo
Next
From: Tom Lane
Date:
Subject: pgsql: Rearrange execution of PARAM_EXTERN Params for plpgsql'sbenefit