Re: pgsql: Specialize tuplesort routines for different kinds of abbreviated

From: Andres Freund <andres(at)anarazel(dot)de>
To: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
Cc: John Naylor <john(dot)naylor(at)postgresql(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Specialize tuplesort routines for different kinds of abbreviated
Date: 2022-04-02 20:33:44
Message-ID: 20220402203344.ahup2u5n73cdbbcv@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Geoghegan 2022-04-02 20:35:41 pgsql: Doc: Add relfrozenxid Tip to XID wraparound section.
Previous Message Andres Freund 2022-04-02 20:21:56 Re: pgsql: Specialize tuplesort routines for different kinds of abbreviated