Re: tuplesort_gettuple_common() and *should_free argument

David Steele <david@pgmasters.net>

From: David Steele <david@pgmasters.net>
To: Peter Geoghegan <pg@heroku.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, hlinnaka <hlinnaka@iki.fi>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2017-03-02T14:43:06Z
Lists: pgsql-hackers
Peter,

On 2/1/17 12:59 AM, Michael Paquier wrote:
> On Thu, Jan 26, 2017 at 8:16 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> [ in the service of closing out this thread... ]
>>
>> Peter Geoghegan <pg@heroku.com> writes:
>>> Finally, 0003-* is a Valgrind suppression borrowed from my parallel
>>> CREATE INDEX patch. It's self-explanatory.
>>
>> Um, I didn't find it all that self-explanatory.  Why wouldn't we want
>> to avoid writing undefined data?  I think the comment at least needs
>> to explain exactly what part of the written data might be uninitialized.
>> And I'd put the comment into valgrind.supp, too, not in the commit msg.
>>
>> Also, the suppression seems far too broad.  It would for instance
>> block any complaint about a write() invoked via an elog call from
>> any function invoked from any LogicalTape* function, no matter
>> how far removed.

It looks like we are waiting on a new patch.  Do you know when you will
have that ready?

Thanks,
-- 
-David
david@pgmasters.net


Commits

  1. Fix duplicated words in comment.

  2. Remove should_free arguments to tuplesort routines.

  3. Fix use-after-free around DISTINCT transition function calls.