diff options
author | Amit Kapila <akapila@postgresql.org> | 2022-08-22 08:51:25 +0530 |
---|---|---|
committer | Amit Kapila <akapila@postgresql.org> | 2022-08-22 08:51:25 +0530 |
commit | 254d79f0b23dfe107594c90ee8375165422db2c4 (patch) | |
tree | 7738c1fe8ca3d1092991d482d64fd424e947072d | |
parent | 24f457aa2b7006e4b427a3ac1e7ce0f248b55ba3 (diff) | |
download | postgresql-254d79f0b23dfe107594c90ee8375165422db2c4.tar.gz postgresql-254d79f0b23dfe107594c90ee8375165422db2c4.zip |
Use logical operator && instead of & in vacuumparallel.c.
As such the current usage of & won't produce incorrect results but it
would be better to use && to short-circuit the evaluation of second
condition when the same is not required.
Author: Ranier Vilela
Reviewed-by: Tom Lane, Bharath Rupireddy
Backpatch-through: 15, where it was introduced
Discussion: https://postgr.es/m/CAEudQApL8QcoYwQuutkWKY_h7gBY8F0Xs34YKfc7-G0i83K_pw@mail.gmail.com
-rw-r--r-- | src/backend/commands/vacuumparallel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/commands/vacuumparallel.c b/src/backend/commands/vacuumparallel.c index 5c6f646eff9..f26d796e52b 100644 --- a/src/backend/commands/vacuumparallel.c +++ b/src/backend/commands/vacuumparallel.c @@ -612,7 +612,7 @@ parallel_vacuum_process_all_indexes(ParallelVacuumState *pvs, int num_index_scan Assert(indstats->status == PARALLEL_INDVAC_STATUS_INITIAL); indstats->status = new_status; indstats->parallel_workers_can_process = - (pvs->will_parallel_vacuum[i] & + (pvs->will_parallel_vacuum[i] && parallel_vacuum_index_is_parallel_safe(pvs->indrels[i], num_index_scans, vacuum)); |