Improve the naming of Parallel Hash Join phases.
authorThomas Munro <tmunro@postgresql.org>
Wed, 22 Mar 2023 23:39:43 +0000 (12:39 +1300)
committerThomas Munro <tmunro@postgresql.org>
Thu, 23 Mar 2023 00:14:25 +0000 (13:14 +1300)
commit8fba928fd78856712f69d96852f8061e77390fda
treebad0cda018a6e277f7b4d92180edf55ea3eac057
parent11470f544e3729c60fab890145b2e839cbc8905e
Improve the naming of Parallel Hash Join phases.

* Commit 3048898e dropped -ING from PHJ wait event names.  Update the
  corresponding barrier phases names to match.

* Rename the "DONE" phases to "FREE".  That's symmetrical with
  "ALLOCATE", and names the activity that actually happens in that phase
  (as we do for the other phases) rather than a state.  The bug fixed by
  commit 8d578b9b might have been more obvious with this name.

* Rename the batch/bucket growth barriers' "ALLOCATE" phases to
  "REALLOCATE", a better description of what they do.

* Update the high level comments about phases to highlight phases
  are executed by a single process with an asterisk (mostly memory
  management phases).

No behavior change, as this is just improving internal identifiers.  The
only user-visible sign of this is that a couple of wait events' display
names change from "...Allocate" to "...Reallocate" in pg_stat_activity,
to stay in sync with the internal names.

Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>
Discussion: https://postgr.es/m/CA%2BhUKG%2BMDpwF2Eo2LAvzd%3DpOh81wUTsrwU1uAwR-v6OGBB6%2B7g%40mail.gmail.com
doc/src/sgml/monitoring.sgml
src/backend/executor/nodeHash.c
src/backend/executor/nodeHashjoin.c
src/backend/utils/activity/wait_event.c
src/include/executor/hashjoin.h
src/include/utils/wait_event.h