forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5df307c
committed
Restructure local-buffer handling per recent pghackers discussion.
The local buffer manager is no longer used for newly-created relations(unless they are TEMP); a new non-TEMP relation goes through the sharedbufmgr and thus will participate normally in checkpoints. But TEMP relationsuse the local buffer manager throughout their lifespan. Also, operationsin TEMP relations are not logged in WAL, thus improving performance.Since it's no longer necessary to fsync relations as they move out of thelocal buffers into shared buffers, quite a lot of smgr.c/md.c/fd.c codeis no longer needed and has been removed: there's no concept of a dirtyrelation anymore in md.c/fd.c, and we never fsync anything but WAL.Still TODO: improve local buffer management algorithms so that it wouldbe reasonable to increase NLocBuffer.1 parent35cd432 commit5df307c
File tree
28 files changed
+543
-955
lines changed- src
- backend
- access
- heap
- nbtree
- transam
- catalog
- commands
- executor
- storage
- buffer
- file
- smgr
- utils/cache
- include
- access
- storage
- utils
28 files changed
+543
-955
lines changedLines changed: 31 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
1155 | 1155 |
| |
1156 | 1156 |
| |
1157 | 1157 |
| |
| 1158 | + | |
1158 | 1159 |
| |
1159 | 1160 |
| |
1160 | 1161 |
| |
| |||
1204 | 1205 |
| |
1205 | 1206 |
| |
1206 | 1207 |
| |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
1207 | 1214 |
| |
1208 | 1215 |
| |
1209 | 1216 |
| |
| |||
1323 | 1330 |
| |
1324 | 1331 |
| |
1325 | 1332 |
| |
| 1333 | + | |
1326 | 1334 |
| |
1327 | 1335 |
| |
1328 | 1336 |
| |
1329 | 1337 |
| |
1330 | 1338 |
| |
| 1339 | + | |
1331 | 1340 |
| |
| 1341 | + | |
1332 | 1342 |
| |
1333 | 1343 |
| |
1334 | 1344 |
| |
| |||
1351 | 1361 |
| |
1352 | 1362 |
| |
1353 | 1363 |
| |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
1354 | 1370 |
| |
1355 | 1371 |
| |
1356 | 1372 |
| |
1357 | 1373 |
| |
1358 | 1374 |
| |
1359 |
| - | |
1360 | 1375 |
| |
1361 | 1376 |
| |
1362 | 1377 |
| |
| |||
1659 | 1674 |
| |
1660 | 1675 |
| |
1661 | 1676 |
| |
| 1677 | + | |
1662 | 1678 |
| |
1663 | 1679 |
| |
1664 | 1680 |
| |
| |||
1671 | 1687 |
| |
1672 | 1688 |
| |
1673 | 1689 |
| |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
1674 | 1695 |
| |
1675 | 1696 |
| |
1676 | 1697 |
| |
| |||
1927 | 1948 |
| |
1928 | 1949 |
| |
1929 | 1950 |
| |
| 1951 | + | |
| 1952 | + | |
| 1953 | + | |
1930 | 1954 |
| |
1931 | 1955 |
| |
1932 | 1956 |
| |
| |||
1978 | 2002 |
| |
1979 | 2003 |
| |
1980 | 2004 |
| |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
1981 | 2008 |
| |
1982 | 2009 |
| |
1983 | 2010 |
| |
| |||
2012 | 2039 |
| |
2013 | 2040 |
| |
2014 | 2041 |
| |
2015 |
| - | |
| 2042 | + | |
| 2043 | + | |
2016 | 2044 |
| |
2017 | 2045 |
| |
2018 | 2046 |
| |
|
Lines changed: 8 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
102 | 102 |
| |
103 | 103 |
| |
104 | 104 |
| |
| 105 | + | |
105 | 106 |
| |
106 | 107 |
| |
107 | 108 |
| |
| |||
231 | 232 |
| |
232 | 233 |
| |
233 | 234 |
| |
234 |
| - | |
| 235 | + | |
| 236 | + | |
235 | 237 |
| |
236 |
| - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
237 | 241 |
| |
238 | 242 |
| |
239 | 243 |
| |
| |||
249 | 253 |
| |
250 | 254 |
| |
251 | 255 |
| |
252 |
| - | |
| 256 | + | |
253 | 257 |
| |
254 | 258 |
| |
255 | 259 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
915 | 915 |
| |
916 | 916 |
| |
917 | 917 |
| |
918 |
| - | |
| 918 | + | |
919 | 919 |
| |
920 | 920 |
| |
921 | 921 |
| |
|
Lines changed: 11 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
623 | 623 |
| |
624 | 624 |
| |
625 | 625 |
| |
| 626 | + | |
626 | 627 |
| |
| 628 | + | |
627 | 629 |
| |
| 630 | + | |
628 | 631 |
| |
629 | 632 |
| |
630 | 633 |
| |
| |||
866 | 869 |
| |
867 | 870 |
| |
868 | 871 |
| |
| 872 | + | |
| 873 | + | |
| 874 | + | |
869 | 875 |
| |
870 | 876 |
| |
871 | 877 |
| |
| |||
891 | 897 |
| |
892 | 898 |
| |
893 | 899 |
| |
894 |
| - | |
| 900 | + | |
895 | 901 |
| |
896 | 902 |
| |
897 | 903 |
| |
| |||
1352 | 1358 |
| |
1353 | 1359 |
| |
1354 | 1360 |
| |
| 1361 | + | |
1355 | 1362 |
| |
1356 | 1363 |
| |
1357 | 1364 |
| |
| |||
1366 | 1373 |
| |
1367 | 1374 |
| |
1368 | 1375 |
| |
1369 |
| - | |
| 1376 | + | |
1370 | 1377 |
| |
1371 | 1378 |
| |
1372 | 1379 |
| |
| |||
1388 | 1395 |
| |
1389 | 1396 |
| |
1390 | 1397 |
| |
| 1398 | + | |
1391 | 1399 |
| |
1392 | 1400 |
| |
1393 | 1401 |
| |
|
Lines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| |||
173 | 173 |
| |
174 | 174 |
| |
175 | 175 |
| |
| 176 | + | |
176 | 177 |
| |
177 | 178 |
| |
178 | 179 |
| |
| |||
187 | 188 |
| |
188 | 189 |
| |
189 | 190 |
| |
190 |
| - | |
| 191 | + | |
| 192 | + | |
191 | 193 |
| |
192 | 194 |
| |
193 | 195 |
| |
| |||
457 | 459 |
| |
458 | 460 |
| |
459 | 461 |
| |
| 462 | + | |
460 | 463 |
| |
461 | 464 |
| |
462 | 465 |
| |
|
0 commit comments
Comments
(0)