forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3eb77eb
committed
Refactor the fsync queue for wider use.
Previously, md.c and checkpointer.c were tightly integrated so thatfsync calls could be handed off and processed in the background.Introduce a system of callbacks and file tags, so that other modulescan hand off fsync work in the same way.For now only md.c uses the new interface, but other users are beingproposed. Since there may be use cases that are not strictly SMGRimplementations, use a new function table for sync handlers ratherthan extending the traditional SMGR one.Instead of using a bitmapset of segment numbers for each RelFileNodein the checkpointer's hash table, make the segment number part of thekey. This requires sending explicit "forget" requests for everysegment individually when relations are dropped, but suits the filelayout schemes of proposed future users better (ie sparse or highsegment numbers).Author: Shawn Debnath and Thomas MunroReviewed-by: Thomas Munro, Andres FreundDiscussion:https://postgr.es/m/CAEepm=2gTANm=e3ARnJT=n0h8hf88wqmaZxk0JYkxw+b21fNrw@mail.gmail.com1 parent33215d1 commit3eb77eb
File tree
18 files changed
+904
-890
lines changed- src
- backend
- access/transam
- commands
- postmaster
- storage
- buffer
- smgr
- sync
- utils/init
- include
- postmaster
- storage
- tools/pgindent
18 files changed
+904
-890
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
98 | 98 |
| |
99 | 99 |
| |
100 | 100 |
| |
| 101 | + | |
101 | 102 |
| |
102 | 103 |
| |
103 | 104 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
| 53 | + | |
53 | 54 |
| |
54 | 55 |
| |
55 | 56 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
66 | 66 |
| |
67 | 67 |
| |
68 | 68 |
| |
| 69 | + | |
69 | 70 |
| |
70 | 71 |
| |
71 | 72 |
| |
| |||
6981 | 6982 |
| |
6982 | 6983 |
| |
6983 | 6984 |
| |
6984 |
| - | |
| 6985 | + | |
6985 | 6986 |
| |
6986 | 6987 |
| |
6987 | 6988 |
| |
| |||
8566 | 8567 |
| |
8567 | 8568 |
| |
8568 | 8569 |
| |
8569 |
| - | |
| 8570 | + | |
8570 | 8571 |
| |
8571 | 8572 |
| |
8572 | 8573 |
| |
| |||
8856 | 8857 |
| |
8857 | 8858 |
| |
8858 | 8859 |
| |
8859 |
| - | |
| 8860 | + | |
8860 | 8861 |
| |
8861 | 8862 |
| |
8862 | 8863 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
54 | 54 |
| |
55 | 55 |
| |
56 | 56 |
| |
| 57 | + | |
57 | 58 |
| |
58 | 59 |
| |
59 | 60 |
| |
| |||
941 | 942 |
| |
942 | 943 |
| |
943 | 944 |
| |
944 |
| - | |
| 945 | + | |
945 | 946 |
| |
946 | 947 |
| |
947 | 948 |
| |
948 |
| - | |
| 949 | + | |
949 | 950 |
| |
950 | 951 |
| |
951 | 952 |
| |
| |||
2150 | 2151 |
| |
2151 | 2152 |
| |
2152 | 2153 |
| |
2153 |
| - | |
| 2154 | + | |
2154 | 2155 |
| |
2155 | 2156 |
| |
2156 | 2157 |
| |
|
Lines changed: 14 additions & 26 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
108 | 108 |
| |
109 | 109 |
| |
110 | 110 |
| |
111 |
| - | |
112 |
| - | |
113 |
| - | |
114 |
| - | |
| 111 | + | |
| 112 | + | |
115 | 113 |
| |
116 | 114 |
| |
117 | 115 |
| |
| |||
349 | 347 |
| |
350 | 348 |
| |
351 | 349 |
| |
352 |
| - | |
| 350 | + | |
353 | 351 |
| |
354 | 352 |
| |
355 | 353 |
| |
| |||
684 | 682 |
| |
685 | 683 |
| |
686 | 684 |
| |
687 |
| - | |
| 685 | + | |
688 | 686 |
| |
689 | 687 |
| |
690 | 688 |
| |
| |||
709 | 707 |
| |
710 | 708 |
| |
711 | 709 |
| |
712 |
| - | |
| 710 | + | |
713 | 711 |
| |
714 | 712 |
| |
715 | 713 |
| |
| |||
1084 | 1082 |
| |
1085 | 1083 |
| |
1086 | 1084 |
| |
1087 |
| - | |
| 1085 | + | |
1088 | 1086 |
| |
1089 | 1087 |
| |
1090 | 1088 |
| |
| |||
1093 | 1091 |
| |
1094 | 1092 |
| |
1095 | 1093 |
| |
1096 |
| - | |
1097 |
| - | |
1098 |
| - | |
1099 |
| - | |
1100 |
| - | |
1101 |
| - | |
1102 |
| - | |
1103 |
| - | |
1104 |
| - | |
1105 | 1094 |
| |
1106 | 1095 |
| |
1107 | 1096 |
| |
| |||
1113 | 1102 |
| |
1114 | 1103 |
| |
1115 | 1104 |
| |
1116 |
| - | |
| 1105 | + | |
1117 | 1106 |
| |
1118 | 1107 |
| |
1119 | 1108 |
| |
| |||
1122 | 1111 |
| |
1123 | 1112 |
| |
1124 | 1113 |
| |
1125 |
| - | |
| 1114 | + | |
1126 | 1115 |
| |
1127 | 1116 |
| |
1128 | 1117 |
| |
| |||
1151 | 1140 |
| |
1152 | 1141 |
| |
1153 | 1142 |
| |
1154 |
| - | |
1155 |
| - | |
1156 |
| - | |
| 1143 | + | |
| 1144 | + | |
1157 | 1145 |
| |
1158 | 1146 |
| |
1159 | 1147 |
| |
| |||
1284 | 1272 |
| |
1285 | 1273 |
| |
1286 | 1274 |
| |
1287 |
| - | |
1288 |
| - | |
| 1275 | + | |
| 1276 | + | |
1289 | 1277 |
| |
1290 | 1278 |
| |
1291 | 1279 |
| |
1292 | 1280 |
| |
1293 | 1281 |
| |
1294 | 1282 |
| |
1295 | 1283 |
| |
1296 |
| - | |
| 1284 | + | |
1297 | 1285 |
| |
1298 | 1286 |
| |
1299 | 1287 |
| |
| |||
1335 | 1323 |
| |
1336 | 1324 |
| |
1337 | 1325 |
| |
1338 |
| - | |
| 1326 | + | |
1339 | 1327 |
| |
1340 | 1328 |
| |
1341 | 1329 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2584 | 2584 |
| |
2585 | 2585 |
| |
2586 | 2586 |
| |
2587 |
| - | |
| 2587 | + | |
2588 | 2588 |
| |
2589 | 2589 |
| |
2590 | 2590 |
| |
|
0 commit comments
Comments
(0)