Re: pgsql: Specialize tuplesort routines for different kinds of abbreviated - Mailing list pgsql-committers

From Andres Freund
Subject Re: pgsql: Specialize tuplesort routines for different kinds of abbreviated
Date
Msg-id 20220402203344.ahup2u5n73cdbbcv@alap3.anarazel.de
Whole thread Raw
In response to pgsql: Specialize tuplesort routines for different kinds of abbreviated  (John Naylor <john.naylor@postgresql.org>)
List pgsql-committers
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



pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pgsql: Specialize tuplesort routines for different kinds of abbreviated
Next
From: Peter Geoghegan
Date:
Subject: pgsql: Doc: Add relfrozenxid Tip to XID wraparound section.