PostgreSQL Source Code: src/backend/storage/file/fileset.c Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
23
24#include <limits.h>
25
31
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51void
53{
54 static uint32 counter = 0;
55
57 fileset->number = counter;
58 counter = (counter + 1) % INT_MAX;
59
60
66 {
67
70 }
71 else
72 {
73 int i;
74
75
76
77
78
79
81 {
84 }
85 }
86}
87
88
89
90
93{
96
99
100
101 if (file <= 0)
102 {
106
111 }
112
113 return file;
114}
115
116
117
120{
123
126
127 return file;
128}
129
130
131
132
133
134
135bool
137 bool error_on_failure)
138{
140
142
144}
145
146
147
148
149void
151{
153 int i;
154
155
156
157
158
159
161 {
164 }
165}
166
167
168
169
170
171static void
173{
175
180}
181
182
183
184
185static Oid
187{
189
191}
192
193
194
195
196static void
198{
200
203}
void PrepareTempTablespaces(void)
int GetTempTablespaces(Oid *tableSpaces, int numSpaces)
File PathNameOpenTemporaryFile(const char *path, int mode)
File PathNameCreateTemporaryFile(const char *path, bool error_on_failure)
void PathNameDeleteTemporaryDir(const char *dirname)
bool PathNameDeleteTemporaryFile(const char *path, bool error_on_failure)
void PathNameCreateTemporaryDir(const char *basedir, const char *directory)
void TempTablespacePath(char *path, Oid tablespace)
#define PG_TEMP_FILE_PREFIX
File FileSetOpen(FileSet *fileset, const char *name, int mode)
bool FileSetDelete(FileSet *fileset, const char *name, bool error_on_failure)
static void FilePath(char *path, FileSet *fileset, const char *name)
void FileSetInit(FileSet *fileset)
void FileSetDeleteAll(FileSet *fileset)
static void FileSetPath(char *path, FileSet *fileset, Oid tablespace)
static Oid ChooseTablespace(const FileSet *fileset, const char *name)
File FileSetCreate(FileSet *fileset, const char *name)
static Datum hash_any(const unsigned char *k, int keylen)
static PgChecksumMode mode
static unsigned hash(unsigned *uv, int n)