Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 46fb4de

Browse files
committed
Process GatherMergePath in get_path_clauses routine.
Replace find_ok assert with elog panic message.
1 parent 96cf83e commit 46fb4de

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

path_utils.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ get_path_clauses(Path *path, PlannerInfo *root, List **selectivities)
113113
selectivities);
114114
break;
115115
case T_GatherPath:
116+
case T_GatherMergePath:
116117
return get_path_clauses(((GatherPath *) path)->subpath, root,
117118
selectivities);
118119
break;

storage.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,9 @@ update_query(int query_hash, bool learn_aqo, bool use_aqo,
234234
slot = MakeSingleTupleTableSlot(query_index_scan->heapRelation->rd_att,
235235
&TTSOpsBufferHeapTuple);
236236
find_ok = index_getnext_slot(query_index_scan, ForwardScanDirection, slot);
237-
Assert(find_ok);
237+
if (!find_ok)
238+
elog(PANIC, "Query isn't found in AQO learning database.");
239+
238240
tuple = ExecFetchSlotHeapTuple(slot, true, &shouldFree);
239241
Assert(shouldFree != true);
240242

0 commit comments

Comments
 (0)