postgresql/src/backend/commands
David Rowley 0e3e1c4e1c Make EXPLAIN ANALYZE of HashAgg more similar to Hash Join
There were various unnecessary differences between Hash Agg's EXPLAIN
ANALYZE output and Hash Join's.  Here we modify the Hash Agg output so
that it's better aligned to Hash Join's.

The following changes have been made:
1. Start batches counter at 1 instead of 0.
2. Always display the "Batches" property, even when we didn't spill to
   disk.
3. Use the text "Batches" instead of "HashAgg Batches" for text format.
4. Use the text "Memory Usage" instead of "Peak Memory Usage" for text
   format.
5. Include "Batches" before "Memory Usage" in both text and non-text
   formats.

In passing also modify the "Planned Partitions" property so that we show
it regardless of if the value is 0 or not for non-text EXPLAIN formats.
This was pointed out by Justin Pryzby and probably should have been part
of 40efbf870.

Reviewed-by: Justin Pryzby, Jeff Davis
Discussion: https://postgr.es/m/CAApHDvrshRnA6C0VFnu7Fb9TVvgGo80PUMm5+2DiaS1gEkPvtw@mail.gmail.com
Backpatch-through: 13, where HashAgg batching was introduced
2020-07-29 11:42:21 +12:00
..
Makefile Revert 0f5ca02f53 2020-04-08 11:37:27 +03:00
aggregatecmds.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
alter.c Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
amcmds.c Unify drop-by-OID functions 2020-06-09 09:39:46 +02:00
analyze.c Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
async.c Spelling adjustments 2020-06-07 15:06:51 +02:00
cluster.c Refactor cluster.c to use new routine get_index_isclustered() 2020-04-06 11:44:23 +09:00
collationcmds.c Remove utils/acl.h from catalog/objectaddress.h 2020-03-10 10:27:00 +01:00
comment.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
constraint.c Fix bogus CALLED_AS_TRIGGER() defenses. 2020-04-03 11:24:56 -04:00
conversioncmds.c Remove utils/acl.h from catalog/objectaddress.h 2020-03-10 10:27:00 +01:00
copy.c Improve performance of binary COPY FROM through better buffering. 2020-07-25 16:34:35 -04:00
createas.c Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
dbcommands.c Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
define.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
discard.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
dropcmds.c Remove utils/acl.h from catalog/objectaddress.h 2020-03-10 10:27:00 +01:00
event_trigger.c Eliminate cache lookup errors in SQL functions for object addresses 2020-07-15 09:03:10 +09:00
explain.c Make EXPLAIN ANALYZE of HashAgg more similar to Hash Join 2020-07-29 11:42:21 +12:00
extension.c Eliminate cache lookup errors in SQL functions for object addresses 2020-07-15 09:03:10 +09:00
foreigncmds.c Unify drop-by-OID functions 2020-06-09 09:39:46 +02:00
functioncmds.c Unify drop-by-OID functions 2020-06-09 09:39:46 +02:00
indexcmds.c Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
lockcmds.c Make inherited LOCK TABLE perform access permission checks on parent table only. 2020-02-18 13:13:15 +09:00
matview.c Skip WAL for new relfilenodes, under wal_level=minimal. 2020-04-04 12:25:34 -07:00
opclasscmds.c Unify drop-by-OID functions 2020-06-09 09:39:46 +02:00
operatorcmds.c Remove utils/acl.h from catalog/objectaddress.h 2020-03-10 10:27:00 +01:00
policy.c Introduce macros for typalign and typstorage constants. 2020-03-04 10:34:25 -05:00
portalcmds.c Avoid using a cursor in plpgsql's RETURN QUERY statement. 2020-06-12 12:14:32 -04:00
prepare.c Add generic_plans and custom_plans fields into pg_prepared_statements. 2020-07-20 11:55:50 +09:00
proclang.c Unify drop-by-OID functions 2020-06-09 09:39:46 +02:00
publicationcmds.c Unify drop-by-OID functions 2020-06-09 09:39:46 +02:00
schemacmds.c Unify drop-by-OID functions 2020-06-09 09:39:46 +02:00
seclabel.c Grammar object type refactoring 2020-06-13 09:19:30 +02:00
sequence.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
statscmds.c Add missing invocations to object access hooks 2020-05-23 14:03:04 +09:00
subscriptioncmds.c Allow logical replication to transfer data in binary format. 2020-07-18 12:44:51 -04:00
tablecmds.c Eliminate cache lookup errors in SQL functions for object addresses 2020-07-15 09:03:10 +09:00
tablespace.c Fix temporary tablespaces for shared filesets some more. 2020-07-03 17:01:34 -04:00
trigger.c Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
tsearchcmds.c Unify drop-by-OID functions 2020-06-09 09:39:46 +02:00
typecmds.c Run pgindent with new pg_bsd_indent version 2.1.1. 2020-05-16 11:54:51 -04:00
user.c Change default of password_encryption to scram-sha-256 2020-06-10 16:42:55 +02:00
vacuum.c code: replace most remaining uses of 'master'. 2020-07-08 13:24:35 -07:00
variable.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
view.c Restructure ALTER TABLE execution to fix assorted bugs. 2020-01-15 18:49:24 -05:00