postgresql/src/bin/pg_dump
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
..
po Translation updates 2013-10-07 16:51:52 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
common.c Update messages, comments and documentation for materialized views. 2013-07-05 15:37:51 -04:00
compress_io.c Replace pg_asprintf() with psprintf(). 2013-10-22 19:40:26 -04:00
compress_io.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
dumputils.c Move some pg_dump function around. 2013-03-27 18:10:40 +02:00
dumputils.h Move some pg_dump function around. 2013-03-27 18:10:40 +02:00
keywords.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
Makefile Move some pg_dump function around. 2013-03-27 18:10:40 +02:00
nls.mk Switch dependency order of libpgcommon and libpgport 2013-10-17 22:02:35 -04:00
parallel.c During parallel pg_dump, free commands from master 2013-07-14 14:35:26 -04:00
parallel.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
pg_backup_archiver.c Use improved vsnprintf calling logic in more places. 2013-10-24 21:43:57 -04:00
pg_backup_archiver.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
pg_backup_custom.c Move some pg_dump function around. 2013-03-27 18:10:40 +02:00
pg_backup_db.c Move some pg_dump function around. 2013-03-27 18:10:40 +02:00
pg_backup_db.h pg_dump: Further reduce reliance on global variables. 2012-02-07 10:07:02 -05:00
pg_backup_directory.c pg_dump: Formatting cleanup of new messages 2013-07-11 21:48:09 -04:00
pg_backup_null.c Move some pg_dump function around. 2013-03-27 18:10:40 +02:00
pg_backup_tar.c Use improved vsnprintf calling logic in more places. 2013-10-24 21:43:57 -04:00
pg_backup_tar.h Fix tar files emitted by pg_dump and pg_basebackup to be POSIX conformant. 2012-09-28 15:19:15 -04:00
pg_backup_utils.c Move some pg_dump function around. 2013-03-27 18:10:40 +02:00
pg_backup_utils.h Move some pg_dump function around. 2013-03-27 18:10:40 +02:00
pg_backup.h Accept multiple -I, -P, -T and -n options in pg_restore. 2013-08-28 09:43:34 +03:00
pg_dump_sort.c Move some pg_dump function around. 2013-03-27 18:10:40 +02:00
pg_dump.c Allow aggregates to provide estimates of their transition state data size. 2013-11-16 16:03:40 -05:00
pg_dump.h Add the notion of REPLICA IDENTITY for a table. 2013-11-08 12:30:43 -05:00
pg_dumpall.c pg_dump/pg_dumpall: remove unnecessary SQL trailing semicolons 2013-07-31 11:37:17 -04:00
pg_restore.c Accept multiple -I, -P, -T and -n options in pg_restore. 2013-08-28 09:43:34 +03:00