File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -511,23 +511,23 @@ PG_FUNCTION_INFO_V1(pg_stat_wait_reset_profile);
511
511
Datum
512
512
pg_stat_wait_reset_profile (PG_FUNCTION_ARGS )
513
513
{
514
- int i ;
514
+ int i , j ;
515
515
BackendWaitCells * cells = (BackendWaitCells * )((char * )WaitShmem
516
516
+ sizeof (int ) + /* counter */
517
517
+ MAXALIGN (sizeof (slock_t ))); /* lock */
518
518
519
- for (i = 0 ; i < MaxBackends ; i ++ )
519
+ for (i = 0 ; i < MaxBackends ; i ++ )
520
520
{
521
521
BackendWaitCells * item = cells + i ;
522
522
do
523
523
{
524
524
/* wait until backend is updating this block */
525
525
} while (!pg_atomic_test_set_flag (& item -> isBusy ));
526
526
527
- for (i = 0 ; i < WAIT_EVENTS_COUNT ; i ++ )
527
+ for (j = 0 ; j < WAIT_EVENTS_COUNT ; j ++ )
528
528
{
529
- item -> cells [i ].interval = 0 ;
530
- item -> cells [i ].count = 0 ;
529
+ item -> cells [j ].interval = 0 ;
530
+ item -> cells [j ].count = 0 ;
531
531
}
532
532
pg_atomic_clear_flag (& item -> isBusy );
533
533
}
You can’t perform that action at this time.
0 commit comments