git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: b4570d3) | patch
Remove useless pfree()s at the ends of various ValuePerCall SRFs.
2020年3月17日 01:36:53 +0000 (21:36 -0400)
2020年3月17日 01:36:53 +0000 (21:36 -0400)
commit 41b45576d532ab6ef4a968f78b5b06d700ebf61f
Remove useless pfree()s at the ends of various ValuePerCall SRFs.

We don't need to manually clean up allocations in a SRF's
multi_call_memory_ctx, because the SRF_RETURN_DONE infrastructure
takes care of that (and also ensures that it will happen even if the
function never gets a final call, which simple manual cleanup cannot
do).

Hence, the code removed by this patch is a waste of code and cycles.
Worse, it gives the impression that cleaning up manually is a thing,
which can lead to more serious errors such as those fixed in
commits 085b6b667 and b4570d33a. So we should get rid of it.

These are not quite actual bugs though, so I couldn't muster the
enthusiasm to back-patch. Fix in HEAD only.

Justin Pryzby

Discussion: https://postgr.es/m/20200308173103.GC1357@telsasoft.com
contrib/pageinspect/btreefuncs.c diff | blob | blame | history
contrib/pageinspect/ginfuncs.c diff | blob | blame | history
contrib/pageinspect/hashfuncs.c diff | blob | blame | history
src/backend/access/transam/multixact.c diff | blob | blame | history
src/backend/tsearch/wparser.c diff | blob | blame | history
src/backend/utils/adt/jsonfuncs.c diff | blob | blame | history
src/backend/utils/adt/tsvector_op.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /