@@ -953,31 +953,14 @@ MtmExecutorStart(QueryDesc *queryDesc, int eflags)
953
953
TargetEntry * tle = (TargetEntry * ) lfirst (tlist );
954
954
if (tle -> expr && IsA (tle -> expr , FuncExpr ))
955
955
{
956
- Oid func_oid = ((FuncExpr * )tle -> expr )-> funcid ;
957
- if (!hash_search (MtmRemoteFunctions , & func_oid , HASH_FIND , NULL ))
956
+ Oid func_oid = ((FuncExpr * ) tle -> expr )-> funcid ;
957
+
958
+ if (hash_search (MtmRemoteFunctions , & func_oid , HASH_FIND , NULL ))
958
959
{
959
- Form_pg_proc funcform ;
960
- bool is_sec_def ;
961
- HeapTuple func_tuple = SearchSysCache1 (PROCOID , ObjectIdGetDatum (func_oid ));
962
- if (!HeapTupleIsValid (func_tuple ))
963
- elog (ERROR , "cache lookup failed for function %u" , func_oid );
964
- funcform = (Form_pg_proc ) GETSTRUCT (func_tuple );
965
- is_sec_def = funcform -> prosecdef ;
966
- ReleaseSysCache (func_tuple );
967
- if (!is_sec_def )
968
- {
969
- continue ;
970
- }
960
+ MtmProcessDDLCommand (queryDesc -> sourceText , true);
961
+ MtmDDLStatement = queryDesc ;
962
+ break ;
971
963
}
972
- /*
973
- * Execute security defined functions or functions marked as remote at replicated nodes.
974
- * Them are executed as DDL statements.
975
- * All data modifications done inside this function are not replicated.
976
- * As a result generated content can vary at different nodes.
977
- */
978
- MtmProcessDDLCommand (queryDesc -> sourceText , true);
979
- MtmDDLStatement = queryDesc ;
980
- break ;
981
964
}
982
965
}
983
966
}
@@ -1009,6 +992,7 @@ MtmExecutorFinish(QueryDesc *queryDesc)
1009
992
RelationGetIndexList (rel );
1010
993
}
1011
994
if (rel -> rd_replidindex == InvalidOid ) {
995
+ // XXX
1012
996
MtmMakeRelationLocal (RelationGetRelid (rel ));
1013
997
continue ;
1014
998
}
0 commit comments