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

Function CleanupOnePartition

src/backend/executor/nodeDynamicForeignscan.c:259–272  ·  view source on GitHub ↗

* CleanupOnePartition * Cleans up a partition's relation and releases all locks. */

Source from the content-addressed store, hash-verified

257 * Cleans up a partition's relation and releases all locks.
258 */
259static void
260CleanupOnePartition(DynamicForeignScanState *scanState)
261{
262 Assert(NULL != scanState);
263
264 if (scanState->foreignScanState)
265 {
266 ExecEndForeignScan(scanState->foreignScanState);
267 scanState->foreignScanState = NULL;
268 Assert(scanState->ss.ss_currentRelation != NULL);
269 table_close(scanState->ss.ss_currentRelation, NoLock);
270 scanState->ss.ss_currentRelation = NULL;
271 }
272}
273
274/*
275 * DynamicForeignScanEndCurrentScan

Callers 2

ExecDynamicForeignScanFunction · 0.70

Calls 2

ExecEndForeignScanFunction · 0.85
table_closeFunction · 0.85

Tested by

no test coverage detected