10000 bug fix in the difference implementation for the bug fix :) · mpws2013n1/postgres@c2304e0 · GitHub
[go: up one dir, main page]

Skip to content

Commit c2304e0

Browse files
committed
bug fix in the difference implementation for the bug fix :)
1 parent 5f75c8a commit c2304e0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/backend/executor/execProcnode.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,12 +363,16 @@ ExecInitNode(Plan *node, EState *estate, int eflags) {
363363

364364
// we do not want to invalid the statistic values, because they do not change the values from the original tables
365365
case T_Agg:
366+
oids = piggyback->tableOids;
366367
result = (PlanState *) ExecInitAgg((Agg *) node, estate, eflags);
368+
InvalidateStatisticsForTables(oids);
367369
break;
368370

369371
case T_WindowAgg:
372+
oids = piggyback->tableOids;
370373
result = (PlanState *) ExecInitWindowAgg((WindowAgg *) node, estate,
371374
eflags);
375+
InvalidateStatisticsForTables(oids);
372376
break;
373377

374378
case T_Unique:
@@ -389,7 +393,9 @@ ExecInitNode(Plan *node, EState *estate, int eflags) {
389393
break;
390394

391395
case T_Limit:
396+
oids = piggyback->tableOids;
392397
result = (PlanState *) ExecInitLimit((Limit *) node, estate, eflags);
398+
InvalidateStatisticsForTables(oids);
393399
break;
394400

395401
default:
@@ -441,7 +447,7 @@ InvalidateStatisticsForTables(List* oldTableOids)
441447
}
442448
if (isNewOid == 1)
443449
{
444-
lappend(relevantTableOids, l1);
450+
relevantTableOids = lappend(relevantTableOids, (int*)lfirst(l1));
445451
}
446452
}
447453

0 commit comments

Comments
 (0)
0