@@ -458,8 +458,8 @@ bgw_main_concurrent_part(Datum main_arg)
458
458
ConcurrentPartSlot * part_slot ;
459
459
char * sql = NULL ;
460
460
int64 rows ;
461
- bool failed ;
462
- int failures_count = 0 ;
461
+ volatile bool failed ;
462
+ volatile int failures_count = 0 ;
463
463
LOCKMODE lockmode = RowExclusiveLock ;
464
464
465
465
/* Update concurrent part slot */
@@ -497,7 +497,7 @@ bgw_main_concurrent_part(Datum main_arg)
497
497
Oid types [2 ] = { OIDOID , INT4OID };
498
498
Datum vals [2 ] = { part_slot -> relid , part_slot -> batch_size };
499
499
500
- bool rel_locked = false;
500
+ volatile bool rel_locked = false;
501
501
502
502
/* Reset loop variables */
503
503
failed = false;
@@ -545,14 +545,12 @@ bgw_main_concurrent_part(Datum main_arg)
545
545
546
546
/* Great, now relation is locked */
547
547
rel_locked = true;
548
- (void ) rel_locked ; /* mute clang analyzer */
549
548
550
549
/* Make sure that relation exists */
551
550
if (!SearchSysCacheExists1 (RELOID , ObjectIdGetDatum (part_slot -> relid )))
552
551
{
553
552
/* Exit after we raise ERROR */
554
553
failures_count = PART_WORKER_MAX_ATTEMPTS ;
555
- (void ) failures_count ; /* mute clang analyzer */
556
554
557
555
elog (ERROR , "relation %u does not exist" , part_slot -> relid );
558
556
}
@@ -562,7 +560,6 @@ bgw_main_concurrent_part(Datum main_arg)
562
560
{
563
561
/* Exit after we raise ERROR */
564
562
failures_count = PART_WORKER_MAX_ATTEMPTS ;
565
- (void ) failures_count ; /* mute clang analyzer */
566
563
567
564
elog (ERROR , "relation \"%s\" is not partitioned" ,
568
565
get_rel_name (part_slot -> relid ));
0 commit comments