1 /*-------------------------------------------------------------------------
4 * Management of named temporary files.
6 * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
9 * src/include/storage/fileset.h
11 *-------------------------------------------------------------------------
17 #include "storage/fd.h"
20 * A set of temporary files.
22 typedef struct FileSet
24 pid_t creator_pid
; /* PID of the creating process */
25 uint32 number
; /* per-PID identifier */
26 int ntablespaces
; /* number of tablespaces to use */
27 Oid tablespaces
[8]; /* OIDs of tablespaces to use. Assumes that
28 * it's rare that there more than temp
32 extern void FileSetInit(FileSet
*fileset
);
33 extern File
FileSetCreate(FileSet
*fileset
, const char *name
);
34 extern File
FileSetOpen(FileSet
*fileset
, const char *name
,
36 extern bool FileSetDelete(FileSet
*fileset
, const char *name
,
37 bool error_on_failure
);
38 extern void FileSetDeleteAll(FileSet
*fileset
);