https://github.com/postgres/postgres
Revision f7ae8a2e186ca27f4ea64fddc21bfabaf0618507 authored by David Rowley on 28 September 2022, 22:43:40 UTC, committed by David Rowley on 28 September 2022, 22:43:40 UTC
91e9e89dc modified nodeSort.c so that it used datum sorts when the
targetlist of the outer node contained only a single column.  That commit
failed to recognise that the Datum returned by tuplesort_getdatum() must
be pfree'd when the type is a byref type.  Ronan Dunklau did originally
propose the patch with that restriction, but that, probably through my own
fault, got lost during further development work.

Due to the timing of this report (PG15 RC1 is almost out the door), let's
just restrict the datum sort optimization to apply for byval types only.
We might want to look harder into making this work for byref types in
PG16.

Reported-by: Önder Kalacı
Diagnosis-by: Tom Lane
Discussion: https://postgr.es/m/CACawEhVxe0ufR26UcqtU7GYGRuubq3p6ZWPGXL4cxy_uexpAAQ@mail.gmail.com
Backpatch-through: 15, where 91e9e89dc was introduced.
1 parent 517fab6
History
Tip revision: f7ae8a2e186ca27f4ea64fddc21bfabaf0618507 authored by David Rowley on 28 September 2022, 22:43:40 UTC
Restrict Datum sort optimization to byval types only
Tip revision: f7ae8a2
File Mode Size
config
contrib
doc
src
.cirrus.yml -rw-r--r-- 18.2 KB
.dir-locals.el -rw-r--r-- 730 bytes
.editorconfig -rw-r--r-- 183 bytes
.git-blame-ignore-revs -rw-r--r-- 9.5 KB
.gitattributes -rw-r--r-- 1.4 KB
.gitignore -rw-r--r-- 504 bytes
COPYRIGHT -rw-r--r-- 1.2 KB
GNUmakefile.in -rw-r--r-- 4.1 KB
HISTORY -rw-r--r-- 277 bytes
Makefile -rw-r--r-- 1.8 KB
README -rw-r--r-- 1.2 KB
README.git -rw-r--r-- 721 bytes
aclocal.m4 -rw-r--r-- 397 bytes
configure -rwxr-xr-x 584.4 KB
configure.ac -rw-r--r-- 87.0 KB

README

back to top