forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit05d4cbf
committed
Increase width of RelFileNumbers from 32 bits to 56 bits.
RelFileNumbers are now assigned using a separate counter, instead ofbeing assigned from the OID counter. This counter never wraps around:if all 2^56 possible RelFileNumbers are used, an internal erroroccurs. As the cluster is limited to 2^64 total bytes of WAL, thislimitation should not cause a problem in practice.If the counter were 64 bits wide rather than 56 bits wide, we wouldneed to increase the width of the BufferTag, which might adverselyimpact buffer lookup performance. Also, this lets us use bigint forpg_class.relfilenode and other places where these values are exposedat the SQL level without worrying about overflow.This should remove the need to keep "tombstone" files around untilthe next checkpoint when relations are removed. We do that to keepRelFileNumbers from being recycled, but now that won't happenanyway. However, this patch doesn't actually change anything inthis area; it just makes it possible for a future patch to do so.Dilip Kumar, based on an idea from Andres Freund, who also reviewedsome earlier versions of the patch. Further review and somewordsmithing by me. Also reviewed at various points by AshutoshSharma, Vignesh C, Amul Sul, Álvaro Herrera, and Tom Lane.Discussion:http://postgr.es/m/CA+Tgmobp7+7kmi4gkq7Y+4AM9fTvL+O1oQ4-5gFTT+6Ng-dQ=g@mail.gmail.com1 parent2f47715 commit05d4cbf
File tree
70 files changed
+694
-290
lines changed- contrib
- pg_buffercache
- pg_prewarm
- pg_walinspect
- expected
- sql
- doc/src/sgml
- src
- backend
- access
- gin
- rmgrdesc
- transam
- backup
- catalog
- commands
- nodes
- replication/logical
- storage
- file
- freespace
- lmgr
- smgr
- utils
- adt
- cache
- misc
- bin
- pg_checksums
- pg_controldata
- pg_dump
- pg_rewind
- pg_upgrade
- pg_waldump
- scripts/t
- common
- fe_utils
- include
- access
- catalog
- common
- fe_utils
- storage
- test/regress
- expected
- sql
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
70 files changed
+694
-290
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
10 |
| - | |
| 9 | + | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
|
Lines changed: 30 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + |
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 |
| - | |
| 3 | + | |
4 | 4 |
| |
5 | 5 |
|
Lines changed: 35 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
59 | 59 |
| |
60 | 60 |
| |
61 | 61 |
| |
| 62 | + | |
62 | 63 |
| |
63 |
| - | |
64 |
| - | |
| 64 | + | |
| 65 | + | |
65 | 66 |
| |
66 | 67 |
| |
67 | 68 |
| |
| |||
103 | 104 |
| |
104 | 105 |
| |
105 | 106 |
| |
106 |
| - | |
| 107 | + | |
107 | 108 |
| |
108 | 109 |
| |
109 | 110 |
| |
| |||
209 | 210 |
| |
210 | 211 |
| |
211 | 212 |
| |
212 |
| - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
213 | 231 |
| |
214 | 232 |
| |
215 | 233 |
| |
| |||
237 | 255 |
| |
238 | 256 |
| |
239 | 257 |
| |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + |
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
345 | 345 |
| |
346 | 346 |
| |
347 | 347 |
| |
348 |
| - | |
| 348 | + | |
349 | 349 |
| |
350 | 350 |
| |
351 | 351 |
| |
| |||
669 | 669 |
| |
670 | 670 |
| |
671 | 671 |
| |
672 |
| - | |
| 672 | + | |
673 | 673 |
| |
674 | 674 |
| |
675 | 675 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
54 | 54 |
| |
55 | 55 |
| |
56 | 56 |
| |
57 |
| - | |
| 57 | + | |
58 | 58 |
| |
59 |
| - | |
| 59 | + | |
60 | 60 |
| |
61 | 61 |
| |
62 | 62 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
42 |
| - | |
| 42 | + | |
43 | 43 |
| |
44 | 44 |
| |
45 |
| - | |
| 45 | + | |
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1984 | 1984 |
| |
1985 | 1985 |
| |
1986 | 1986 |
| |
1987 |
| - | |
| 1987 | + | |
1988 | 1988 |
| |
1989 | 1989 |
| |
1990 | 1990 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25210 | 25210 |
| |
25211 | 25211 |
| |
25212 | 25212 |
| |
| 25213 | + | |
| 25214 | + | |
| 25215 | + | |
| 25216 | + | |
| 25217 | + | |
25213 | 25218 |
| |
25214 | 25219 |
| |
25215 | 25220 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
62 | 62 |
| |
63 | 63 |
| |
64 | 64 |
| |
65 |
| - | |
| 65 | + | |
66 | 66 |
| |
67 | 67 |
| |
68 | 68 |
| |
|
Lines changed: 6 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
217 | 217 |
| |
218 | 218 |
| |
219 | 219 |
| |
220 |
| - | |
221 |
| - | |
222 |
| - | |
223 |
| - | |
224 |
| - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
225 | 226 |
| |
226 | 227 |
| |
227 | 228 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
100 | 100 |
| |
101 | 101 |
| |
102 | 102 |
| |
103 |
| - | |
| 103 | + | |
104 | 104 |
| |
105 | 105 |
| |
106 | 106 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
29 |
| - | |
| 29 | + | |
30 | 30 |
| |
31 | 31 |
| |
32 | 32 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
169 | 169 |
| |
170 | 170 |
| |
171 | 171 |
| |
172 |
| - | |
| 172 | + | |
173 | 173 |
| |
174 | 174 |
| |
175 | 175 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
100 | 100 |
| |
101 | 101 |
| |
102 | 102 |
| |
103 |
| - | |
| 103 | + | |
104 | 104 |
| |
105 | 105 |
| |
106 | 106 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
28 |
| - | |
| 28 | + | |
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
|
Lines changed: 16 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
48 |
| - | |
49 |
| - | |
| 48 | + | |
| 49 | + | |
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
| |||
55 | 55 |
| |
56 | 56 |
| |
57 | 57 |
| |
| 58 | + | |
58 | 59 |
| |
59 | 60 |
| |
60 | 61 |
| |
| |||
74 | 75 |
| |
75 | 76 |
| |
76 | 77 |
| |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
77 | 85 |
| |
78 | 86 |
| |
79 | 87 |
| |
| |||
169 | 177 |
| |
170 | 178 |
| |
171 | 179 |
| |
| 180 | + | |
| 181 | + | |
| 182 | + | |
172 | 183 |
| |
173 | 184 |
| |
174 | 185 |
| |
| |||
237 | 248 |
| |
238 | 249 |
| |
239 | 250 |
| |
240 |
| - | |
| 251 | + | |
241 | 252 |
| |
242 | 253 |
| |
243 | 254 |
| |
| |||
297 | 308 |
| |
298 | 309 |
| |
299 | 310 |
| |
300 |
| - | |
| 311 | + | |
301 | 312 |
| |
302 | 313 |
| |
303 | 314 |
| |
| |||
306 | 317 |
| |
307 | 318 |
| |
308 | 319 |
| |
309 |
| - | |
| 320 | + | |
310 | 321 |
| |
311 | 322 |
| |
312 | 323 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
692 | 692 |
| |
693 | 693 |
| |
694 | 694 |
| |
695 |
| - | |
696 |
| - | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
697 | 698 |
| |
698 | 699 |
| |
699 | 700 |
| |
|
0 commit comments
Comments
(0)