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

Function SharedFileSetDeleteAll

src/backend/storage/file/sharedfileset.c:212–231  ·  view source on GitHub ↗

* Delete all files in the set. */

Source from the content-addressed store, hash-verified

210 * Delete all files in the set.
211 */
212void
213SharedFileSetDeleteAll(SharedFileSet *fileset)
214{
215 char dirpath[MAXPGPATH];
216 int i;
217
218 /*
219 * Delete the directory we created in each tablespace. Doesn't fail
220 * because we use this in error cleanup paths, but can generate LOG
221 * message on IO error.
222 */
223 for (i = 0; i < fileset->ntablespaces; ++i)
224 {
225 SharedFileSetPath(dirpath, fileset, fileset->tablespaces[i]);
226 PathNameDeleteTemporaryDir(dirpath);
227 }
228
229 /* Unregister the shared fileset */
230 SharedFileSetUnregister(fileset);
231}
232
233/*
234 * Callback function that will be invoked when this backend detaches from a

Callers 5

subxact_info_writeFunction · 0.85
stream_cleanup_filesFunction · 0.85
SharedFileSetOnDetachFunction · 0.85

Calls 3

SharedFileSetPathFunction · 0.85
SharedFileSetUnregisterFunction · 0.85

Tested by

no test coverage detected