🌐 AI搜索 & 代理 主页
Skip to content

Commit 171198f

Browse files
committed
pageinspect: use index_close() for GiST index relation
gist_page_items() opens its target relation with index_open(), but closed it using relation_close() instead of index_close(). This was harmless because index_close() and relation_close() do the exact same work, still inconsistent with the rest of the code tree as routines opening and closing a relation based on a relkind are expected to match, at least in name. Author: Chao Li <li.evan.chao@gmail.com> Discussion: https://postgr.es/m/CAEoWx2=bL41WWcD-4Fxx-buS2Y2G5=9PjkxZbHeFMR6Uy2WNvw@mail.gmail.com
1 parent 481783e commit 171198f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/pageinspect/gistfuncs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ gist_page_items(PG_FUNCTION_ARGS)
361361
tuplestore_putvalues(rsinfo->setResult, rsinfo->setDesc, values, nulls);
362362
}
363363

364-
relation_close(indexRel, AccessShareLock);
364+
index_close(indexRel, AccessShareLock);
365365

366366
return (Datum) 0;
367367
}

0 commit comments

Comments
 (0)