diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2017-12-21 14:21:39 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2017-12-21 14:21:39 -0300 |
commit | 8a0596cb656e357c391cccf12854beb2e05f3901 (patch) | |
tree | cde4a211405b9bcb1406ec8cb28ab3ab400a1068 /src/backend/tcop/postgres.c | |
parent | 9ef6aba1d3513829d9f77a4a91ca52f2e5719aef (diff) | |
download | postgresql-8a0596cb656e357c391cccf12854beb2e05f3901.tar.gz postgresql-8a0596cb656e357c391cccf12854beb2e05f3901.zip |
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
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions