diff options
author | Thomas Munro <tmunro@postgresql.org> | 2021-03-17 18:24:45 +1300 |
---|---|---|
committer | Thomas Munro <tmunro@postgresql.org> | 2021-03-17 18:43:04 +1300 |
commit | 378802e3713c6c0fce31d2390c134cd5d7c30157 (patch) | |
tree | 450729ca825574a00ee8513fff49f987ea0a8e59 /src/include/executor/hashjoin.h | |
parent | 3b8981b6e1a2aea0f18384c803e21e9391de669a (diff) | |
download | postgresql-378802e3713c6c0fce31d2390c134cd5d7c30157.tar.gz postgresql-378802e3713c6c0fce31d2390c134cd5d7c30157.zip |
Update the names of Parallel Hash Join phases.
Commit 3048898e dropped -ING from some wait event names that correspond
to barrier phases. Update the phases' names to match.
While we're here making cosmetic changes, also rename "DONE" to "FREE".
That pairs better with "ALLOCATE", and describes the activity that
actually happens in that phase (as we do for the other phases) rather
than describing a state. The distinction is clearer after bugfix commit
3b8981b6 split the phase into two. As for the growth barriers, rename
their "ALLOCATE" phase to "REALLOCATE", which is probably a better
description of what happens then. Also improve the comments about
the phases a bit.
Discussion: https://postgr.es/m/CA%2BhUKG%2BMDpwF2Eo2LAvzd%3DpOh81wUTsrwU1uAwR-v6OGBB6%2B7g%40mail.gmail.com
Diffstat (limited to 'src/include/executor/hashjoin.h')
-rw-r--r-- | src/include/executor/hashjoin.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/include/executor/hashjoin.h b/src/include/executor/hashjoin.h index d8edd399239..176fbef149e 100644 --- a/src/include/executor/hashjoin.h +++ b/src/include/executor/hashjoin.h @@ -254,32 +254,32 @@ typedef struct ParallelHashJoinState } ParallelHashJoinState; /* The phases for building batches, used by build_barrier. */ -#define PHJ_BUILD_ELECTING 0 -#define PHJ_BUILD_ALLOCATING 1 -#define PHJ_BUILD_HASHING_INNER 2 -#define PHJ_BUILD_HASHING_OUTER 3 -#define PHJ_BUILD_RUNNING 4 -#define PHJ_BUILD_DONE 5 +#define PHJ_BUILD_ELECT 0 +#define PHJ_BUILD_ALLOCATE 1 +#define PHJ_BUILD_HASH_INNER 2 +#define PHJ_BUILD_HASH_OUTER 3 +#define PHJ_BUILD_RUN 4 +#define PHJ_BUILD_FREE 5 /* The phases for probing each batch, used by for batch_barrier. */ -#define PHJ_BATCH_ELECTING 0 -#define PHJ_BATCH_ALLOCATING 1 -#define PHJ_BATCH_LOADING 2 -#define PHJ_BATCH_PROBING 3 -#define PHJ_BATCH_DONE 4 +#define PHJ_BATCH_ELECT 0 +#define PHJ_BATCH_ALLOCATE 1 +#define PHJ_BATCH_LOAD 2 +#define PHJ_BATCH_PROBE 3 +#define PHJ_BATCH_FREE 4 /* The phases of batch growth while hashing, for grow_batches_barrier. */ -#define PHJ_GROW_BATCHES_ELECTING 0 -#define PHJ_GROW_BATCHES_ALLOCATING 1 -#define PHJ_GROW_BATCHES_REPARTITIONING 2 -#define PHJ_GROW_BATCHES_DECIDING 3 -#define PHJ_GROW_BATCHES_FINISHING 4 +#define PHJ_GROW_BATCHES_ELECT 0 +#define PHJ_GROW_BATCHES_REALLOCATE 1 +#define PHJ_GROW_BATCHES_REPARTITION 2 +#define PHJ_GROW_BATCHES_DECIDE 3 +#define PHJ_GROW_BATCHES_FINISH 4 #define PHJ_GROW_BATCHES_PHASE(n) ((n) % 5) /* circular phases */ /* The phases of bucket growth while hashing, for grow_buckets_barrier. */ -#define PHJ_GROW_BUCKETS_ELECTING 0 -#define PHJ_GROW_BUCKETS_ALLOCATING 1 -#define PHJ_GROW_BUCKETS_REINSERTING 2 +#define PHJ_GROW_BUCKETS_ELECT 0 +#define PHJ_GROW_BUCKETS_REALLOCATE 1 +#define PHJ_GROW_BUCKETS_REINSERT 2 #define PHJ_GROW_BUCKETS_PHASE(n) ((n) % 3) /* circular phases */ typedef struct HashJoinTableData |