8000 support more node types for invalidating statistics · mpws2013n1/postgres@3299298 · GitHub
[go: up one dir, main page]

8000 Skip to content

Commit 3299298

Browse files
committed
support more node types for invalidating statistics
1 parent c2304e0 commit 3299298

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/backend/executor/execProcnode.c

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,32 +176,44 @@ ExecInitNode(Plan *node, EState *estate, int eflags) {
176176
break;
177177

178178
case T_ModifyTable:
179+
oids = piggyback->tableOids;
179180
result = (PlanState *) ExecInitModifyTable((ModifyTable *) node, estate,
180181
eflags);
182+
InvalidateStatisticsForTables(oids);
181183
break;
182184

183185
case T_Append:
186+
oids = piggyback->tableOids;
184187
result = (PlanState *) ExecInitAppend((Append *) node, estate, eflags);
188+
InvalidateStatisticsForTables(oids);
185189
break;
186190

187191
case T_MergeAppend:
192+
oids = piggyback->tableOids;
188193
result = (PlanState *) ExecInitMergeAppend((MergeAppend *) node, estate,
189194
eflags);
195+
InvalidateStatisticsForTables(oids);
190196
break;
191197

192198
case T_RecursiveUnion:
199+
oids = piggyback->tableOids;
193200
result = (PlanState *) ExecInitRecursiveUnion((RecursiveUnion *) node,
194201
estate, eflags);
202+
InvalidateStatisticsForTables(oids);
195203
break;
196204

197205
case T_BitmapAnd:
206+
oids = piggyback->tableOids;
198207
result = (PlanState *) ExecInitBitmapAnd((BitmapAnd *) node, estate,
199208
eflags);
209+
InvalidateStatisticsForTables(oids);
200210
break;
201211

202212
case T_BitmapOr:
213+
oids = piggyback->tableOids;
203214
result = (PlanState *) ExecInitBitmapOr((BitmapOr *) node, estate,
204215
eflags);
216+
InvalidateStatisticsForTables(oids);
205217
break;
206218

207219
/*
@@ -268,55 +280,46 @@ ExecInitNode(Plan *node, EState *estate, int eflags) {
268280
case T_BitmapIndexScan:
269281
result = (PlanState *) ExecInitBitmapIndexScan((BitmapIndexScan *) node,
270282
estate, eflags);
271-
printf(" Bitmap ");
272283
break;
273284

274285
case T_BitmapHeapScan:
275286
result = (PlanState *) ExecInitBitmapHeapScan((BitmapHeapScan *) node,
276287
estate, eflags);
277-
printf(" BitmapHeap ");
278288
break;
279289

280290
case T_TidScan:
281291
result = (PlanState *) ExecInitTidScan((TidScan *) node, estate,
282292
eflags);
283-
printf(" Tid ");
284293
break;
285294

286295
case T_SubqueryScan:
287296
result = (PlanState *) ExecInitSubqueryScan((SubqueryScan *) node,
288297
estate, eflags);
289-
printf(" Subquery ");
290298
break;
291299

292300
case T_FunctionScan:
293301
result = (PlanState *) ExecInitFunctionScan((FunctionScan *) node,
294302
estate, eflags);
295-
printf(" Function ");
296303
break;
297304

298305
case T_ValuesScan:
299306
result = (PlanState *) ExecInitValuesScan((ValuesScan *) node, estate,
300307
eflags);
301-
printf(" Values ");
302308
break;
303309

304310
case T_CteScan:
305311
result = (PlanState *) ExecInitCteScan((CteScan *) node, estate,
306312
eflags);
307-
printf(" Cte ");
308313
break;
309314

310315
case T_WorkTableScan:
311316
result = (PlanState *) ExecInitWorkTableScan((WorkTableScan *) node,
312317
estate, eflags);
313-
printf(" WorkTable ");
314318
break;
315319

316320
case T_ForeignScan:
317321
result = (PlanState *) ExecInitForeignScan((ForeignScan *) node, estate,
318322
eflags);
319-
printf(" Foreign ");
320323
break;
321324

322325
/*

0 commit comments

Comments
 (0)
0