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 changedLines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 |
| - | |
23 | 22 |
| |
24 | 23 |
| |
25 | 24 |
| |
|
Lines changed: 11 additions & 9 deletions
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 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
20 | 19 |
| |
21 | 20 |
| |
22 | 21 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
20 | 19 |
| |
21 | 20 |
| |
22 | 21 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 |
| - | |
21 | 20 |
| |
22 | 21 |
| |
23 | 22 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 |
| - | |
24 | 23 |
| |
25 | 24 |
| |
26 | 25 |
| |
|
Lines changed: 0 additions & 51 deletions
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 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
51 | 51 |
| |
52 | 52 |
| |
53 | 53 |
| |
54 |
| - | |
55 | 54 |
| |
56 | 55 |
| |
57 | 56 |
| |
|
Lines changed: 3 additions & 4 deletions
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 |
| |
|
Lines changed: 1 addition & 1 deletion
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 |
| |
|
Lines changed: 2 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
53 |
| - | |
54 |
| - | |
55 | 53 |
| |
56 | 54 |
| |
57 | 55 |
| |
58 | 56 |
| |
59 |
| - | |
60 | 57 |
| |
61 |
| - | |
62 |
| - | |
63 |
| - | |
64 | 58 |
| |
65 |
| - | |
| 59 | + | |
66 | 60 |
| |
67 | 61 |
| |
68 | 62 |
| |
69 | 63 |
| |
70 |
| - | |
71 | 64 |
| |
72 | 65 |
| |
73 | 66 |
| |
74 |
| - | |
75 | 67 |
| |
76 | 68 |
| |
77 | 69 |
| |
| |||
80 | 72 |
| |
81 | 73 |
| |
82 | 74 |
| |
| 75 | + | |
83 | 76 |
| |
84 | 77 |
| |
85 | 78 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
38 |
| - | |
39 | 38 |
| |
40 | 39 |
| |
41 | 40 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
20 | 19 |
| |
21 | 20 |
| |
22 | 21 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
71 | 71 |
| |
72 | 72 |
| |
73 | 73 |
| |
74 |
| - | |
75 | 74 |
| |
76 | 75 |
| |
77 | 76 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
31 |
| - | |
32 | 31 |
| |
33 | 32 |
| |
34 | 33 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
24 |
| - | |
25 | 24 |
| |
26 | 25 |
| |
27 | 26 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
28 |
| - | |
29 | 28 |
| |
30 | 29 |
| |
31 | 30 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
56 | 56 |
| |
57 | 57 |
| |
58 | 58 |
| |
59 |
| - | |
60 | 59 |
| |
61 | 60 |
| |
62 | 61 |
| |
|
0 commit comments
Comments
(0)