File tree Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -425,11 +425,29 @@ void
425
425
InvalidateStatisticsForTables (List * oldTableOids )
426
426
{
427
427
List * relevantTableOids = NULL ;
428
- ListCell * l ;
429
- relevantTableOids = list_difference (piggyback -> tableOids , oldTableOids );
430
- foreach (l , relevantTableOids )
428
+ ListCell * l1 ;
429
+ ListCell * l2 ;
430
+ //relevantTableOids = list_difference(piggyback->tableOids, oldTableOids);
431
+ foreach (l1 , piggyback -> tableOids )
431
432
{
432
- int currentOid = * ((int * )lfirst (l ));
433
+ int isNewOid = 1 ;
434
+ foreach (l2 , oldTableOids )
435
+ {
436
+ if (* ((int * )lfirst (l1 )) == * ((int * )lfirst (l2 )))
437
+ {
438
+ isNewOid = 0 ;
439
+ break ;
440
+ }
441
+ }
442
+ if (isNewOid == 1 )
443
+ {
444
+ lappend (relevantTableOids , l1 );
445
+ }
446
+ }
447
+
448
+ foreach (l1 , relevantTableOids )
449
+ {
450
+ int currentOid = * ((int * )lfirst (l1 ));
433
451
InvalidateStatisticsForTable (currentOid );
434
452
}
435
453
}
You can’t perform that action at this time.
0 commit comments