pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Save calculated transitionSpace in Agg node.
4+ messages / 3 participants
[nested] [flat]

Commits from this thread:
  2020-02-28 32bb4535a0  Fix commit c11cb17d.
* pgsql: Save calculated transitionSpace in Agg node.
@ 2020-02-27 19:28 Jeff Davis <jdavis@postgresql.org>
  2020-02-27 19:56 ` Re: pgsql: Save calculated transitionSpace in Agg node. Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Jeff Davis @ 2020-02-27 19:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Save calculated transitionSpace in Agg node.

This will be useful in the upcoming Hash Aggregation work to improve
estimates for hash table sizing.

Discussion: https://postgr.es/m/37091115219dd522fd9ed67333ee8ed1b7e09443.camel%40j-davis.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c11cb17dc55a6b432dc637491a4491920f9c2770

Modified Files
--------------
src/backend/optimizer/plan/createplan.c | 9 +++++++--
src/backend/optimizer/util/pathnode.c   | 2 ++
src/include/nodes/pathnodes.h           | 2 ++
src/include/nodes/plannodes.h           | 1 +
src/include/optimizer/planmain.h        | 4 ++--
5 files changed, 14 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pgsql: Save calculated transitionSpace in Agg node.
  2020-02-27 19:28 pgsql: Save calculated transitionSpace in Agg node. Jeff Davis <jdavis@postgresql.org>
@ 2020-02-27 19:56 ` Tom Lane <tgl@sss.pgh.pa.us>
  2020-02-27 23:28   ` Re: pgsql: Save calculated transitionSpace in Agg node. Jeff Davis <pgsql@j-davis.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2020-02-27 19:56 UTC (permalink / raw)
  To: Jeff Davis <jdavis@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org

Jeff Davis <jdavis@postgresql.org> writes:
> Save calculated transitionSpace in Agg node.

Surely this patch is a few bricks shy of a load.  Don't you need
copyfuncs/readfuncs/outfuncs support, for starters?

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pgsql: Save calculated transitionSpace in Agg node.
  2020-02-27 19:28 pgsql: Save calculated transitionSpace in Agg node. Jeff Davis <jdavis@postgresql.org>
  2020-02-27 19:56 ` Re: pgsql: Save calculated transitionSpace in Agg node. Tom Lane <tgl@sss.pgh.pa.us>
@ 2020-02-27 23:28   ` Jeff Davis <pgsql@j-davis.com>
  2020-02-27 23:36     ` Re: pgsql: Save calculated transitionSpace in Agg node. Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Jeff Davis @ 2020-02-27 23:28 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; Jeff Davis <jdavis@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org

On Thu, 2020-02-27 at 14:56 -0500, Tom Lane wrote:
> Jeff Davis <jdavis@postgresql.org> writes:
> > Save calculated transitionSpace in Agg node.
> 
> Surely this patch is a few bricks shy of a load.  Don't you need
> copyfuncs/readfuncs/outfuncs support, for starters?

Sorry, I will fix it.

I was looking at whether changes to copyfuncs (etc.) should also cause
a catversion bump, and it seems inconsistent. Commit 9ce77d75 does, but
6ef77cf4 does not. Any particular rules around that? Not terribly
important as the catversion was just bumped anyway; just curious.

Regards,
	Jeff Davis







^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pgsql: Save calculated transitionSpace in Agg node.
  2020-02-27 19:28 pgsql: Save calculated transitionSpace in Agg node. Jeff Davis <jdavis@postgresql.org>
  2020-02-27 19:56 ` Re: pgsql: Save calculated transitionSpace in Agg node. Tom Lane <tgl@sss.pgh.pa.us>
  2020-02-27 23:28   ` Re: pgsql: Save calculated transitionSpace in Agg node. Jeff Davis <pgsql@j-davis.com>
@ 2020-02-27 23:36     ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2020-02-27 23:36 UTC (permalink / raw)
  To: Jeff Davis <pgsql@j-davis.com>; +Cc: Jeff Davis <jdavis@postgresql.org>; pgsql-committers@lists.postgresql.org

Jeff Davis <pgsql@j-davis.com> writes:
> On Thu, 2020-02-27 at 14:56 -0500, Tom Lane wrote:
>> Surely this patch is a few bricks shy of a load.  Don't you need
>> copyfuncs/readfuncs/outfuncs support, for starters?

> Sorry, I will fix it.

> I was looking at whether changes to copyfuncs (etc.) should also cause
> a catversion bump, and it seems inconsistent. Commit 9ce77d75 does, but
> 6ef77cf4 does not. Any particular rules around that? Not terribly
> important as the catversion was just bumped anyway; just curious.

You need a catversion bump if stored rules/views would change, ie when
messing with something that can appear in parser output.  The old rule
of thumb was "if you touched readfuncs.c you probably need a catversion
bump", but this is less true now that we have read/write support for
plan trees (which need serialization support so we can send them to
parallel workers, but there's no permanent storage).

In this case, since it's only touching plan nodes, you need
copyfuncs/readfuncs/outfuncs adjustments but not a catversion bump.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2020-02-27 23:36 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-02-27 19:28 pgsql: Save calculated transitionSpace in Agg node. Jeff Davis <jdavis@postgresql.org>
2020-02-27 19:56 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-02-27 23:28   ` Jeff Davis <pgsql@j-davis.com>
2020-02-27 23:36     ` Tom Lane <tgl@sss.pgh.pa.us>

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