Skip to content

Commit 66da266

Browse files
authored
Merge f135090 into afddc65
2 parents afddc65 + f135090 commit 66da266

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/pathman_workers.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,8 @@ bgw_main_concurrent_part(Datum main_arg)
458458
ConcurrentPartSlot *part_slot;
459459
char *sql = NULL;
460460
int64 rows;
461-
bool failed;
462-
int failures_count = 0;
461+
volatile bool failed;
462+
volatile int failures_count = 0;
463463
LOCKMODE lockmode = RowExclusiveLock;
464464

465465
/* Update concurrent part slot */
@@ -497,7 +497,7 @@ bgw_main_concurrent_part(Datum main_arg)
497497
Oid types[2] = { OIDOID, INT4OID };
498498
Datum vals[2] = { part_slot->relid, part_slot->batch_size };
499499

500-
bool rel_locked = false;
500+
volatile bool rel_locked = false;
501501

502502
/* Reset loop variables */
503503
failed = false;
@@ -545,14 +545,12 @@ bgw_main_concurrent_part(Datum main_arg)
545545

546546
/* Great, now relation is locked */
547547
rel_locked = true;
548-
(void) rel_locked; /* mute clang analyzer */
549548

550549
/* Make sure that relation exists */
551550
if (!SearchSysCacheExists1(RELOID, ObjectIdGetDatum(part_slot->relid)))
552551
{
553552
/* Exit after we raise ERROR */
554553
failures_count = PART_WORKER_MAX_ATTEMPTS;
555-
(void) failures_count; /* mute clang analyzer */
556554

557555
elog(ERROR, "relation %u does not exist", part_slot->relid);
558556
}
@@ -562,7 +560,6 @@ bgw_main_concurrent_part(Datum main_arg)
562560
{
563561
/* Exit after we raise ERROR */
564562
failures_count = PART_WORKER_MAX_ATTEMPTS;
565-
(void) failures_count; /* mute clang analyzer */
566563

567564
elog(ERROR, "relation \"%s\" is not partitioned",
568565
get_rel_name(part_slot->relid));

0 commit comments

Comments
 (0)