postgresql/src
David Rowley 3a5817695a Restrict Datum sort optimization to byval types only
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.
2022-09-29 11:43:00 +13:00
..
backend Restrict Datum sort optimization to byval types only 2022-09-29 11:43:00 +13:00
bin Fix bug in DROP OWNED BY. 2022-09-28 10:42:07 -04:00
common Change some errdetail() to errdetail_internal() 2022-09-28 17:14:53 +02:00
fe_utils Revert 56-bit relfilenode change and follow-up commits. 2022-09-28 09:55:28 -04:00
include Revert 56-bit relfilenode change and follow-up commits. 2022-09-28 09:55:28 -04:00
interfaces Remove PQsendQuery support in pipeline mode 2022-09-23 18:21:22 +02:00
makefiles windows: remove date from version number in win32ver.rc 2022-09-26 11:38:02 -07:00
pl Introduce GUC_NO_RESET flag. 2022-09-27 11:47:12 -04:00
port meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
template Move darwin sysroot determination into separate file 2022-09-01 16:54:19 -07:00
test Revert 56-bit relfilenode change and follow-up commits. 2022-09-28 09:55:28 -04:00
timezone meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
tools ci: Add hint about downloadable logs to README 2022-09-26 20:02:26 -07:00
tutorial Update copyright for 2022 2022-01-07 19:04:57 -05:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Split TESTDIR into TESTLOGDIR and TESTDATADIR 2022-09-19 18:03:17 -07:00
Makefile.shlib aix: No need to use mkldexport when we want to export all symbols 2022-09-09 19:11:49 -07:00
meson.build meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
nls-global.mk Fix for make unportability 2022-07-13 09:15:01 +02:00