@@ -139,7 +139,7 @@ sr_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
139
139
standard_planner(parse, cursorOptions, boundParams))
140
140
141
141
if (sr_plan_write_mode )
142
- heap_lock = RowExclusiveLock ;
142
+ heap_lock = AccessExclusiveLock ;
143
143
144
144
schema_oid = get_sr_plan_schema ();
145
145
if (!OidIsValid (schema_oid ))
@@ -157,8 +157,7 @@ sr_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
157
157
else
158
158
ReleaseSysCache (ftup );
159
159
}
160
-
161
- if (!sr_plan_fake_func )
160
+ else
162
161
{
163
162
Oid args [1 ] = {ANYELEMENTOID };
164
163
@@ -220,7 +219,7 @@ sr_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
220
219
heap_deform_tuple (local_tuple , sr_plans_heap -> rd_att ,
221
220
search_values , search_nulls );
222
221
223
- /* Check enabled and validate field */
222
+ /* Check enabled and valid field */
224
223
if (DatumGetBool (search_values [4 ]) && DatumGetBool (search_values [5 ]))
225
224
{
226
225
elog (DEBUG1 , "Saved plan was found" );
@@ -239,7 +238,6 @@ sr_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
239
238
if (pl_stmt )
240
239
goto cleanup ;
241
240
242
- /* Invoke original hook if needed */
243
241
pl_stmt = call_standard_planner ();
244
242
245
243
/* Ok, we supported duplicate query_hash but only if all plans with query_hash disabled.*/
0 commit comments