pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Andres Freund <andres@anarazel.de>
Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>
Subject: Re: Parallel Aggregates for string_agg and array_agg
Date: Tue, 02 Aug 2022 20:18:20 -0400
Message-ID: <2800168.1659485900@sss.pgh.pa.us> (raw)
In-Reply-To: <CAApHDvpRddvXK=8b8YZAKa_UPseHwhkBFH+5UZVoeGwq7GmqSQ@mail.gmail.com>
References: <CAKJS1f8cB3cc5AK=wPvByhU_jKkgd81iRt2kE6cru8uxx2HCuA@mail.gmail.com>
	<c302afa6-6415-27a5-336a-e1d4332fab09@2ndquadrant.com>
	<CAKJS1f9xEZdTaBbBEKY+TCKEoSZYaH1oSAtsEJHSYDJCCNnQPQ@mail.gmail.com>
	<24abe018-b3c6-2117-b5b9-39e660db00bd@2ndquadrant.com>
	<CAKJS1f8LV7AT=AAhdYGKtGrGkSkEgO6C_SW2Ztz1sR3encisqw@mail.gmail.com>
	<1b6ee15c-c218-761e-0120-c1ed438e2db2@2ndquadrant.com>
	<657be73a-a21d-0ae1-5c62-870afbdfddd4@2ndquadrant.com>
	<CAKJS1f-bKAD+s-CJetRQPjmrR-gF-kfvwfzhQm-A0PA-nsr1xw@mail.gmail.com>
	<20180326022647.GL24540@tamriel.snowman.net>
	<CAKJS1f-axkksX3XzduLJuTL=o8CSwf1NaQYO6=iHSXR_B3pCKQ@mail.gmail.com>
	<20180326132009.GN24540@tamriel.snowman.net>
	<CAKJS1f8JVpUUkYP2c+RyVRdpS1dnjB_DA5fbcDSL3qfMRqc81Q@mail.gmail.com>
	<6538.1522096067@sss.pgh.pa.us>
	<CA+TgmoZL6-J-_EGWLKxFWjEu5_advC-59C1LnFOJQRgH+E=Q=g@mail.gmail.com>
	<15683.1525208375@sss.pgh.pa.us>
	<CAKJS1f-3fs_u235GKt0fC7D+9vJ9ApB-c1tDVTB_U0HUdGxw-Q@mail.gmail.com>
	<CAKJS1f98yPkRMsE0JnDh72=AQEUuE3atiCJtPVCtjhFwzCRJ! HQ@mail.gmail.com>
	<CAApHDvpRddvXK=8b8YZAKa_UPseHwhkBFH+5UZVoeGwq7GmqSQ@mail.gmail.com>

David Rowley <dgrowleyml@gmail.com> writes:
> Waking up this old thread again. If you don't have a copy, the entire
> thread is in [1].
> The remaining item that seemed to cause this patch to be rejected was
> raised in [2].

Hmm.  My estimate of the percentages of users who will be pleased or
not hasn't really changed since [2].  Also, realizing that you can't
apply these aggregates to extremely large input sets, I wonder just how
much it buys to be able to parallelize them.  So I still put this patch
in the category of "just because we can doesn't mean we should".

Now as against that, if the underlying relation scan is parallelized
then you already have unpredictable input ordering and thus unpredictable
aggregate results.  So anyone who cares about that has already had
to either disable parallelism or insert an ORDER BY somewhere, and
either of those fixes will still work if the aggregates support
parallelism.  Hence, I'm not going to fight hard if you really want
to do it.  But I remain unconvinced that the cost/benefit tradeoff
is attractive.

			regards, tom lane





view thread (77+ messages)  latest in thread

Message-ID: <2800168.1659485900@sss.pgh.pa.us>
Permalink:  ../2800168.1659485900@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2800168.1659485900@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dgrowleyml@gmail.com, robertmhaas@gmail.com, sfrost@snowman.net, andres@anarazel.de, tomas.vondra@enterprisedb.com
  Subject: Re: Parallel Aggregates for string_agg and array_agg
  In-Reply-To: <2800168.1659485900@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox