Heikki Linnakangas <hlinnaka@iki.fi> writes:
> On 10/13/2016 08:27 PM, Peter Geoghegan wrote:
>> The point I'm making is that we might be better off worrying about the
>> general problem, by adding a tuplestore_gettupleslot()-style "copy"
>> boolean argument at the same time, and having some callers pass
>> "false" to avoid copying (when they determine no risk of
>> use-after-free, by not keeping the contents of a slot active across
>> calls to tuplesort_gettupleslot()). You indicated that you don't
>> really want to go there for 9.6, but maybe it's worth reconsidering
>> that. For example, maybe ABI breakage is avoided by making
>> tuplesort_gettupleslot() into a shim. Or, maybe it's okay to put it in
>> the release notes of 9.6.1 -- I'm not sure how manageable that is.
> Pushed this isolated fix for now.
FWIW, I think this is an appropriate solution for 9.6, but I'd favor
changing the function's API to be like tuplestore_gettupleslot's
in HEAD.
regards, tom lane