postgresql/src/bin
Tom Lane 6cb86143e8 Allow aggregates to provide estimates of their transition state data size.
Formerly the planner had a hard-wired rule of thumb for guessing the amount
of space consumed by an aggregate function's transition state data.  This
estimate is critical to deciding whether it's OK to use hash aggregation,
and in many situations the built-in estimate isn't very good.  This patch
adds a column to pg_aggregate wherein a per-aggregate estimate can be
provided, overriding the planner's default, and infrastructure for setting
the column via CREATE AGGREGATE.

It may be that additional smarts will be required in future, perhaps even
a per-aggregate estimation function.  But this is already a step forward.

This is extracted from a larger patch to improve the performance of numeric
and int8 aggregates.  I (tgl) thought it was worth reviewing and committing
this infrastructure separately.  In this commit, all built-in aggregates
are given aggtransspace = 0, so no behavior should change.

Hadi Moshayedi, reviewed by Pavel Stehule and Tomas Vondra
2013-11-16 16:03:40 -05:00
..
initdb Ignore SIGSYS during initdb. 2013-10-24 21:51:30 -04:00
pg_basebackup Clean up password prompting logic in streamutil.c. 2013-11-15 17:27:41 -05:00
pg_config Switch dependency order of libpgcommon and libpgport 2013-10-17 22:02:35 -04:00
pg_controldata Translation updates 2013-10-07 16:51:52 -04:00
pg_ctl Replace pg_asprintf() with psprintf(). 2013-10-22 19:40:26 -04:00
pg_dump Allow aggregates to provide estimates of their transition state data size. 2013-11-16 16:03:40 -05:00
pg_resetxlog Translation updates 2013-10-07 16:51:52 -04:00
pgevent pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
psql Fix incorrect column name in psql \d code. 2013-11-14 10:27:24 -05:00
scripts Translation updates 2013-10-07 16:51:52 -04:00
Makefile Update copyrights for 2013 2013-01-01 17:15:01 -05:00