diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index ae9b1f12224c5..e6b69c4e0565d 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -2263,7 +2263,7 @@ preprocess_rowmarks(PlannerInfo *root) RowMarkClause *rc = lfirst_node(RowMarkClause, l); RangeTblEntry *rte = rt_fetch(rc->rti, parse->rtable); PlanRowMark *newrc; - RowRefType refType; + RowRefType *refType = NULL; /* * Currently, it is syntactically impossible to have FOR UPDATE et al @@ -2286,8 +2286,9 @@ preprocess_rowmarks(PlannerInfo *root) newrc = makeNode(PlanRowMark); newrc->rti = newrc->prti = rc->rti; newrc->rowmarkId = ++(root->glob->lastRowMarkId); - newrc->markType = select_rowmark_type(rte, rc->strength, &refType); - newrc->allRefTypes = (1 << refType); + newrc->markType = select_rowmark_type(rte, rc->strength, refType); + Assert(refType); + newrc->allRefTypes = (1 << *refType); newrc->strength = rc->strength; newrc->waitPolicy = rc->waitPolicy; newrc->isParent = false; @@ -2303,7 +2304,7 @@ preprocess_rowmarks(PlannerInfo *root) { RangeTblEntry *rte = lfirst_node(RangeTblEntry, l); PlanRowMark *newrc; - RowRefType refType; + RowRefType *refType = NULL; i++; if (!bms_is_member(i, rels)) @@ -2312,8 +2313,9 @@ preprocess_rowmarks(PlannerInfo *root) newrc = makeNode(PlanRowMark); newrc->rti = newrc->prti = i; newrc->rowmarkId = ++(root->glob->lastRowMarkId); - newrc->markType = select_rowmark_type(rte, LCS_NONE, &refType); - newrc->allRefTypes = (1 << refType); + newrc->markType = select_rowmark_type(rte, LCS_NONE, refType); + Assert(refType); + newrc->allRefTypes = (1 << *refType); newrc->strength = LCS_NONE; newrc->waitPolicy = LockWaitBlock; /* doesn't matter */ newrc->isParent = false; diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c index 1e20f26fa91a5..93ce77683a423 100644 --- a/src/backend/postmaster/pgarch.c +++ b/src/backend/postmaster/pgarch.c @@ -677,12 +677,12 @@ pgarch_readyXlog(char *xlog) { for (int i = 0; i < arch_files->arch_files_size; i++) { - char *xlog = arch_files->arch_files[i]; + char *xlog1 = arch_files->arch_files[i]; char pathname[MAXPGPATH]; - snprintf(pathname, MAXPGPATH, XLOGDIR "/%s", xlog); + snprintf(pathname, MAXPGPATH, XLOGDIR "/%s", xlog1); ArchiveCallbacks->archive_preload_file_cb(archive_module_state, - xlog, pathname); + xlog1, pathname); } }