Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bw8Bf-00019B-Oa for pgsql-bugs@arkaria.postgresql.org; Mon, 17 Oct 2016 13:42:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bw8Be-0000zc-7p for pgsql-bugs@arkaria.postgresql.org; Mon, 17 Oct 2016 13:42:42 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bw8Bd-0000zV-Ma for pgsql-bugs@postgresql.org; Mon, 17 Oct 2016 13:42:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bw8Bb-0005wD-AQ for pgsql-bugs@postgresql.org; Mon, 17 Oct 2016 13:42:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u9HDgDOX007257; Mon, 17 Oct 2016 09:42:13 -0400 From: Tom Lane To: Heikki Linnakangas cc: Peter Geoghegan , David Rowley , Michael Paquier , Robert Haas , Regina Obe , PostgreSQL mailing lists Subject: Re: BUG #14344: string_agg(DISTINCT ..) crash In-reply-to: References: <20160929035538.20224.39628@wrigleys.postgresql.org> <22270.1475163646@sss.pgh.pa.us> <5b2d9da9-d2a9-ee53-aab4-1112f8dcf072@iki.fi> Comments: In-reply-to Heikki Linnakangas message dated "Mon, 17 Oct 2016 12:20:24 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7255.1476711733.1@sss.pgh.pa.us> Date: Mon, 17 Oct 2016 09:42:13 -0400 Message-ID: <7256.1476711733@sss.pgh.pa.us> X-Pg-Spam-Score: -2.2 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Heikki Linnakangas 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs