diff --git a/src/backend/optimizer/util/inherit.c b/src/backend/optimizer/util/inherit.c index 77b37d00bc1..7a080e65e9a 100644 --- a/src/backend/optimizer/util/inherit.c +++ b/src/backend/optimizer/util/inherit.c @@ -34,6 +34,7 @@ #include "parser/parse_relation.h" #include "partitioning/partdesc.h" #include "partitioning/partprune.h" +#include "utils/injection_point.h" #include "utils/rel.h" @@ -332,6 +333,10 @@ expand_partitioned_rtentry(PlannerInfo *root, RelOptInfo *relinfo, partdesc = PartitionDirectoryLookup(root->glob->partition_directory, parentrel); + /* test-only: pause after a sub-partitioned table's PartitionDesc is read */ + if (parentrel->rd_rel->relispartition) + INJECTION_POINT("expand-subpartdesc-read"); + /* A partitioned table should always have a partition descriptor. */ Assert(partdesc); diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c index 6f2d377001a..ef4cefe7865 100644 --- a/src/backend/optimizer/util/plancat.c +++ b/src/backend/optimizer/util/plancat.c @@ -47,6 +47,7 @@ #include "storage/bufmgr.h" #include "tcop/tcopprot.h" #include "utils/builtins.h" +#include "utils/injection_point.h" #include "utils/lsyscache.h" #include "utils/partcache.h" #include "utils/rel.h" @@ -128,6 +129,9 @@ get_relation_info(PlannerInfo *root, Oid relationObjectId, bool inhparent, */ relation = table_open(relationObjectId, NoLock); + /* test-only: pause after expression preprocessing (inlining), before index_open() */ + INJECTION_POINT("get-relation-info-start"); + /* * Relations without a table AM can be used in a query only if they are of * special-cased relkinds. This check prevents us from crashing later if,