pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Cc: David Rowley <david.rowley@2ndquadrant.com>
Subject: Re: Crash with a CUBE query on 9.6
Date: Tue, 20 Dec 2016 09:47:05 -0500
Message-ID: <29807.1482245225@sss.pgh.pa.us> (raw)
In-Reply-To: <20161220072513.qmp2holifj2yqnzb@alap3.anarazel.de>
References: <ac5b0b69-744c-9114-6218-8300ac920e61@iki.fi>
	<4846.1482176240@sss.pgh.pa.us>
	<8821dc7b-50e0-b983-1590-344108b20855@iki.fi>
	<20161220072513.qmp2holifj2yqnzb@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Andres Freund <andres@anarazel.de> writes:
> But an observation about how the code evolved lately (partially by me,
> don't get me wrong): I think we've too much smarts at execution
> time. IMO deduplicating transition states and such should much rather
> done at plan time, and if we do it right we'd also get rid of the uggly
> way AggState->aggs is built up...

I've looked at that before, and concluded that it wouldn't do that much
beyond shuffling code from point A to point B.  What it would do that
I wouldn't like is widen the API between the planner and executor
(and everything else that looks at plan trees).  For instance, most of
nodeAgg.c's internal structs would have to become public, creating
hazards if we need to change them in a minor release.

You could make an argument that having a better handle on the number of
transition states would give the planner a more accurate gauge of the
use of workmem in HashAgg --- but AFAICT, that is far from the number
one problem we have in hashagg memory estimation, so I can't get excited
about it.

Not saying "no", but I think it'd be a lot of work for not much return.
We have lots of other fish more worth frying.

			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



view thread (9+ messages)  latest in thread

Message-ID: <29807.1482245225@sss.pgh.pa.us>
Permalink:  ../29807.1482245225@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29807.1482245225@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, hlinnaka@iki.fi, david.rowley@2ndquadrant.com
  Subject: Re: Crash with a CUBE query on 9.6
  In-Reply-To: <29807.1482245225@sss.pgh.pa.us>
  References: <ac5b0b69-744c-9114-6218-8300ac920e61@iki.fi> <4846.1482176240@sss.pgh.pa.us> <8821dc7b-50e0-b983-1590-344108b20855@iki.fi> <20161220072513.qmp2holifj2yqnzb@alap3.anarazel.de> <29807.1482245225@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