- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit576477e
committed
Force default wal_sync_method to be fdatasync on Linux.
Recent versions of the Linux system header files cause xlogdefs.h tobelieve that open_datasync should be the default sync method, whereasformerly fdatasync was the default on Linux. open_datasync is a badchoice, first because it doesn't actually outperform fdatasync (in factthe reverse), and second because we try to use O_DIRECT with it, causingfailures on certain filesystems (e.g., ext4 with data=journal option).This part of the patch is largely per a proposal from Marti Raudsepp.More extensive changes are likely to follow in HEAD, but this is as muchchange as we want to back-patch.Also clean up confusing code and incorrect documentation surrounding thefsync_writethrough option. Those changes shouldn't result in any actualbehavioral change, but I chose to back-patch them anyway to keep thebranches looking similar in this area.In 9.0 and HEAD, also do some copy-editing on the WAL Reliabilitydocumentation section.Back-patch to all supported branches, since any of them might get usedon modern Linux versions.1 parente620ee3 commit576477e
File tree
7 files changed
+77
-62
lines changed- doc/src/sgml
- src
- backend
- storage/file
- utils/misc
- include
- access
- port
7 files changed
+77
-62
lines changedLines changed: 19 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1460 | 1460 |
| |
1461 | 1461 |
| |
1462 | 1462 |
| |
1463 |
| - | |
1464 |
| - | |
| 1463 | + | |
| 1464 | + | |
1465 | 1465 |
| |
1466 | 1466 |
| |
1467 | 1467 |
| |
1468 | 1468 |
| |
1469 | 1469 |
| |
1470 | 1470 |
| |
1471 |
| - | |
| 1471 | + | |
1472 | 1472 |
| |
1473 |
| - | |
1474 |
| - | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
1475 | 1476 |
| |
1476 | 1477 |
| |
1477 | 1478 |
| |
| |||
1554 | 1555 |
| |
1555 | 1556 |
| |
1556 | 1557 |
| |
1557 |
| - | |
| 1558 | + | |
1558 | 1559 |
| |
1559 | 1560 |
| |
1560 | 1561 |
| |
1561 | 1562 |
| |
1562 |
| - | |
| 1563 | + | |
1563 | 1564 |
| |
1564 | 1565 |
| |
1565 | 1566 |
| |
| |||
1569 | 1570 |
| |
1570 | 1571 |
| |
1571 | 1572 |
| |
1572 |
| - | |
1573 | 1573 |
| |
| 1574 | + | |
1574 | 1575 |
| |
1575 |
| - | |
| 1576 | + | |
| 1577 | + | |
1576 | 1578 |
| |
1577 | 1579 |
| |
1578 | 1580 |
| |
1579 | 1581 |
| |
1580 |
| - | |
1581 |
| - | |
1582 | 1582 |
| |
1583 | 1583 |
| |
1584 | 1584 |
| |
| |||
1686 | 1686 |
| |
1687 | 1687 |
| |
1688 | 1688 |
| |
1689 |
| - | |
1690 |
| - | |
1691 |
| - | |
1692 |
| - | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
1693 | 1692 |
| |
1694 | 1693 |
| |
1695 | 1694 |
| |
1696 | 1695 |
| |
1697 | 1696 |
| |
1698 | 1697 |
| |
1699 |
| - | |
1700 |
| - | |
1701 |
| - | |
1702 |
| - | |
1703 |
| - | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
1704 | 1703 |
| |
1705 | 1704 |
| |
1706 | 1705 |
| |
|
Lines changed: 32 additions & 29 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
30 |
| - | |
| 30 | + | |
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
| |||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
51 |
| - | |
| 51 | + | |
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
| |||
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
60 |
| - | |
| 60 | + | |
61 | 61 |
| |
62 |
| - | |
63 |
| - | |
64 |
| - | |
65 |
| - | |
66 |
| - | |
67 |
| - | |
68 |
| - | |
| 62 | + | |
| 63 | + | |
69 | 64 |
| |
70 | 65 |
| |
71 | 66 |
| |
| |||
81 | 76 |
| |
82 | 77 |
| |
83 | 78 |
| |
84 |
| - | |
| 79 | + | |
85 | 80 |
| |
86 | 81 |
| |
87 | 82 |
| |
| |||
107 | 102 |
| |
108 | 103 |
| |
109 | 104 |
| |
110 |
| - | |
111 |
| - | |
112 |
| - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
113 | 110 |
| |
114 | 111 |
| |
115 | 112 |
| |
116 | 113 |
| |
117 | 114 |
| |
118 |
| - | |
| 115 | + | |
119 | 116 |
| |
120 | 117 |
| |
121 | 118 |
| |
122 | 119 |
| |
123 | 120 |
| |
124 | 121 |
| |
125 |
| - | |
126 |
| - | |
127 |
| - | |
128 |
| - | |
129 |
| - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
130 | 130 |
| |
131 |
| - | |
132 |
| - | |
| 131 | + | |
| 132 | + | |
133 | 133 |
| |
134 | 134 |
| |
135 |
| - | |
| 135 | + | |
136 | 136 |
| |
137 | 137 |
| |
138 |
| - | |
| 138 | + | |
139 | 139 |
| |
140 | 140 |
| |
141 | 141 |
| |
| |||
148 | 148 |
| |
149 | 149 |
| |
150 | 150 |
| |
| 151 | + | |
| 152 | + | |
151 | 153 |
| |
152 | 154 |
| |
153 | 155 |
| |
| |||
157 | 159 |
| |
158 | 160 |
| |
159 | 161 |
| |
160 |
| - | |
161 |
| - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
162 | 165 |
| |
163 |
| - | |
| 166 | + | |
164 | 167 |
| |
165 | 168 |
| |
166 | 169 |
| |
167 |
| - | |
| 170 | + | |
168 | 171 |
| |
169 |
| - | |
| 172 | + | |
170 | 173 |
| |
171 | 174 |
| |
172 | 175 |
| |
|
Lines changed: 5 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
260 | 260 |
| |
261 | 261 |
| |
262 | 262 |
| |
263 |
| - | |
264 |
| - | |
265 |
| - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
266 | 267 |
| |
267 | 268 |
| |
268 |
| - | |
| 269 | + | |
269 | 270 |
| |
270 | 271 |
| |
271 | 272 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
157 | 157 |
| |
158 | 158 |
| |
159 | 159 |
| |
160 |
| - | |
| 160 | + | |
161 | 161 |
| |
162 | 162 |
| |
163 | 163 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
123 | 123 |
| |
124 | 124 |
| |
125 | 125 |
| |
126 |
| - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
127 | 129 |
| |
128 | 130 |
| |
129 | 131 |
| |
130 |
| - | |
131 |
| - | |
132 | 132 |
| |
133 | 133 |
| |
134 | 134 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + |
Lines changed: 9 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
37 |
| - | |
38 |
| - | |
39 | 37 |
| |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
40 | 42 |
| |
41 |
| - | |
42 |
| - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 |
| |
44 |
| - | |
| 47 | + | |
| 48 | + | |
45 | 49 |
| |
46 | 50 |
| |
47 | 51 |
| |
|
0 commit comments
Comments
(0)