forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2d00190
committed
Rationalize common/relpath.[hc].
Commita730183 created rather a mess byputting dependencies on backend-only include files into include/common.We really shouldn't do that. To clean it up:* Move TABLESPACE_VERSION_DIRECTORY back to its longtime home incatalog/catalog.h. We won't consider this symbol part of the FE/BE API.* Push enum ForkNumber from relfilenode.h into relpath.h. We'll considerrelpath.h as the source of truth for fork numbers, since relpath.c wasalready partially serving that function, and anyway relfilenode.h waskind of a random place for that enum.* So, relfilenode.h now includes relpath.h rather than vice-versa. Thisdirection of dependency is fine. (That allows most, but not quite all,of the existing explicit #includes of relpath.h to go away again.)* Push forkname_to_number from catalog.c to relpath.c, just to centralizefork number stuff a bit better.* Push GetDatabasePath from catalog.c to relpath.c; it was rather oddthat the previous commit didn't keep this together with relpath().* To avoid needing relfilenode.h in common/, redefine the underlyingfunction (now called GetRelationPath) as taking separate OID arguments,and make the APIs using RelFileNode or RelFileNodeBackend into macrowrappers. (The macros have a potential multiple-eval risk, but none ofthe existing call sites have an issue with that; one of them had such arisk already anyway.)* Fix failure to follow the directions when "init" fork type was added;specifically, the errhint in forkname_to_number wasn't updated, and neitherwas the SGML documentation for pg_relation_size().* Fix tablespace-path-too-long check in CreateTableSpace() to account forfork-name component of maximum-length pathnames. This requires puttingFORKNAMECHARS into a header file, but it was rather useless (andactually unreferenced) where it was.The last couple of items are potentially back-patchable bug fixes,if anyone is sufficiently excited about them; but personally I'm not.Per a gripe from Christoph Berg about how include/common wasn'tself-contained.1 parent0bff398 commit2d00190
File tree
22 files changed
+173
-163
lines changed- contrib/pg_xlogdump
- doc/src/sgml
- src
- backend
- access
- rmgrdesc
- transam
- catalog
- commands
- replication
- logical
- storage
- buffer
- file
- smgr
- utils
- adt
- cache
- common
- include
- catalog
- common
- storage
22 files changed
+173
-163
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16847 | 16847 | | |
16848 | 16848 | | |
16849 | 16849 | | |
16850 | | - | |
| 16850 | + | |
16851 | 16851 | | |
16852 | 16852 | | |
16853 | 16853 | | |
| |||
16951 | 16951 | | |
16952 | 16952 | | |
16953 | 16953 | | |
16954 | | - | |
16955 | | - | |
16956 | | - | |
16957 | | - | |
16958 | | - | |
16959 | | - | |
16960 | | - | |
16961 | | - | |
| 16954 | + | |
| 16955 | + | |
| 16956 | + | |
| 16957 | + | |
| 16958 | + | |
| 16959 | + | |
| 16960 | + | |
| 16961 | + | |
| 16962 | + | |
| 16963 | + | |
16962 | 16964 | | |
16963 | 16965 | | |
16964 | 16966 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | 47 | | |
99 | 48 | | |
100 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
| |||
278 | 277 | | |
279 | 278 | | |
280 | 279 | | |
281 | | - | |
282 | | - | |
| 280 | + | |
| 281 | + | |
283 | 282 | | |
284 | 283 | | |
285 | | - | |
| 284 | + | |
286 | 285 | | |
287 | 286 | | |
288 | 287 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | | - | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
0 commit comments
Comments
(0)