Hi, On 2022-04-02 13:15:57 -0700, Andres Freund wrote: > There's definitely something borked - looks like this is ending up with bogus > pointers? Using rr to set a watchpoint on isnull1, and continuing backward I > see the memory written to with the following stack:
Looks like it's just plain old uninitialized data. tuplesort_putheaptuple() doesn't compute SortTuple.{isnull1,datum1}. And comparetup_heap() doesn't rely on them being set. But tuplesort_sort_memtuples() will now bypass comparetup_heap(), so comparetup_heap computing those doesn't help anymore. Greetings, Andres Freund