MCPcopy Create free account
hub / github.com/apache/cloudberry / ExecCloseIndices

Function ExecCloseIndices

src/backend/executor/execIndexing.c:225–248  ·  view source on GitHub ↗

---------------------------------------------------------------- * ExecCloseIndices * * Close the index relations stored in resultRelInfo * ---------------------------------------------------------------- */

Source from the content-addressed store, hash-verified

223 * ----------------------------------------------------------------
224 */
225void
226ExecCloseIndices(ResultRelInfo *resultRelInfo)
227{
228 int i;
229 int numIndices;
230 RelationPtr indexDescs;
231
232 numIndices = resultRelInfo->ri_NumIndices;
233 indexDescs = resultRelInfo->ri_IndexRelationDescs;
234
235 for (i = 0; i < numIndices; i++)
236 {
237 if (indexDescs[i] == NULL)
238 continue; /* shouldn't happen? */
239
240 /* Drop lock acquired by ExecOpenIndices */
241 index_close(indexDescs[i], RowExclusiveLock);
242 }
243
244 /*
245 * XXX should free indexInfo array here too? Currently we assume that
246 * such stuff will be cleaned up automatically in FreeExecutorState.
247 */
248}
249
250/* ----------------------------------------------------------------
251 * ExecInsertIndexTuples

Callers 10

EndMethod · 0.85
ExecCloseResultRelationsFunction · 0.85
ExecCleanupTupleRoutingFunction · 0.85
CatalogCloseIndexesFunction · 0.85

Calls 1

index_closeFunction · 0.85

Tested by

no test coverage detected