* CleanupOnePartition * Cleans up a partition's relation and releases all locks. */
| 257 | * Cleans up a partition's relation and releases all locks. |
| 258 | */ |
| 259 | static void |
| 260 | CleanupOnePartition(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 |
no test coverage detected