Re: BUG #14344: string_agg(DISTINCT ..) crash

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Peter Geoghegan <pg(at)heroku(dot)com>, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Regina Obe <lr(at)pcorp(dot)us>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14344: string_agg(DISTINCT ..) crash
Date: 2016-10-17 13:42:13
Message-ID: 7256.1476711733@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Heikki Linnakangas <hlinnaka(at)iki(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message anup.saund 2016-10-17 17:45:15 BUG #14374: psql.exe command options \dtvs produces a database list, not table/view/sequences.
Previous Message Heikki Linnakangas 2016-10-17 09:20:24 Re: BUG #14344: string_agg(DISTINCT ..) crash