From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use CP_SMALL_TLIST for hash aggregate
Date: Sun, 31 May 2020 13:21:45 +0000
Message-ID: <E1jfNuL-0005vm-JV@gemulon.postgresql.org> (raw)
Use CP_SMALL_TLIST for hash aggregate
Commit 1f39bce021 added disk-based hash aggregation, which may spill
incoming tuples to disk. It however did not request projection to make
the tuples as narrow as possible, which may mean having to spill much
more data than necessary (increasing I/O, pushing other stuff from page
cache, etc.).
This adds CP_SMALL_TLIST in places that may use hash aggregation - we do
that only for AGG_HASHED. It's unnecessary for AGG_SORTED, because that
either uses explicit Sort (which already does projection) or pre-sorted
input (which does not need spilling to disk).
Author: Tomas Vondra
Reviewed-by: Jeff Davis
Discussion: https://postgr.es/m/20200519151202.u2p2gpiawoaznsv2%40development
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/4cad2534da6d17067d98cf04be2dfc1bda8f2cd0
Modified Files
--------------
contrib/postgres_fdw/expected/postgres_fdw.out | 4 ++--
src/backend/optimizer/plan/createplan.c | 28 ++++++++++++++++++++++----
2 files changed, 26 insertions(+), 6 deletions(-)
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-committers@postgresql.org
Cc: tomas.vondra@postgresql.org
Subject: Re: pgsql: Use CP_SMALL_TLIST for hash aggregate
In-Reply-To: <E1jfNuL-0005vm-JV@gemulon.postgresql.org>
References: <E1jfNuL-0005vm-JV@gemulon.postgresql.org>
* 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