diff --git a/hypopg.c b/hypopg.c index 17d9a13..e298956 100644 --- a/hypopg.c +++ b/hypopg.c @@ -464,8 +464,10 @@ hypo_get_relation_info_hook(PlannerInfo *root, bool inhparent, RelOptInfo *rel) { - bool hypopart = false; Relation relation; +#if PG_VERSION_NUM >= 100000 + bool hypopart = false; +#endif if (HYPO_ENABLED()) { diff --git a/hypopg_import.c b/hypopg_import.c index 43f36c2..d2613b9 100644 --- a/hypopg_import.c +++ b/hypopg_import.c @@ -419,7 +419,11 @@ transformPartitionSpec(Relation rel, PartitionSpec *partspec, char *strategy) * rangetable entry. We need a ParseState for transformExpr. */ pstate = make_parsestate(NULL); - rte = addRangeTableEntryForRelation(pstate, rel, NULL, false, true); + rte = addRangeTableEntryForRelation(pstate, rel, +#if PG_VERSION_NUM >= 120000 + AccessShareLock, +#endif + NULL, false, true); addRTEtoQuery(pstate, rte, true, true, true); /* take care of any partition expressions */