Re: BUG #15144: *** glibc detected *** postgres: postgres smsconsole[local] SELECT: double free or corruption (!pre - Mailing list pgsql-bugs

From Peter Geoghegan
Subject Re: BUG #15144: *** glibc detected *** postgres: postgres smsconsole[local] SELECT: double free or corruption (!pre
Date
Msg-id CAH2-Wz=V08u=GN6JEzLawNQJbDog+ce69W5EFzMpG2k45yxTxw@mail.gmail.com
Whole thread Raw
In response to Re: BUG #15144: *** glibc detected *** postgres: postgres smsconsole [local] SELECT: double free or corruption (!pre  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Mon, Apr 16, 2018 at 3:21 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Yeah, I should have thought to question that too.  tuplestore was
> originally built by stripping down tuplesort, and at least in the
> beginning, I'm pretty sure that all these semantic API details were
> the same.  We should likely have made more effort to keep them in
> sync.  (Still, until we've proven that there *is* a bug here,
> let's not kick ourselves too hard.)

FWIW, I think that tuplesort remains a good example for tuplestore to
follow, since the enhancements that prevented the tuplesort crash on
v10+ make just as much sense for tuplestore (and could even have been
justified purely on robustness grounds). Many small palloc() calls are
certainly something that we should try to avoid.

Actually, I once looked into writing such a patch for tuplestore
myself, but IIRC tuplestore_clear() and interXact support made it more
painful than initially thought.

-- 
Peter Geoghegan


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #15144: *** glibc detected *** postgres: postgres smsconsole [local] SELECT: double free or corruption (!pre
Next
From: Andrew Gierth
Date:
Subject: Re: BUG #15144: *** glibc detected *** postgres: postgres smsconsole [local] SELECT: double free or corruption (!pre