- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitdf3b181

Amit Kapila
Add infrastructure to track WAL usage.
This allows gathering the WAL generation statistics for each statementexecution. The three statistics that we collect are the number of WALrecords, the number of full page writes and the amount of WAL bytesgenerated.This helps the users who have write-intensive workload to see the impactof I/O due to WAL. This further enables us to see approximately whatpercentage of overall WAL is due to full page writes.In the future, we can extend this functionality to allow us to compute thethe exact amount of WAL data due to full page writes.This patch in itself is just an infrastructure to compute WAL usage data.The upcoming patches will expose this data via explain, auto_explain,pg_stat_statements and verbose (auto)vacuum output.Author: Kirill Bychik, Julien RouhaudReviewed-by: Dilip Kumar, Fujii Masao and Amit KapilaDiscussion:https://postgr.es/m/CAB-hujrP8ZfUkvL5OYETipQwA=e3n7oqHFU=4ZLxWS_Cza3kQQ@mail.gmail.com1 parent0588ee6 commitdf3b181
File tree
10 files changed
+182
-32
lines changed- src
- backend
- access
- heap
- nbtree
- transam
- executor
- include
- access
- executor
- tools/pgindent
10 files changed
+182
-32
lines changedLines changed: 28 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
139 | 139 |
| |
140 | 140 |
| |
141 | 141 |
| |
| 142 | + | |
142 | 143 |
| |
143 | 144 |
| |
144 | 145 |
| |
| |||
275 | 276 |
| |
276 | 277 |
| |
277 | 278 |
| |
| 279 | + | |
| 280 | + | |
| 281 | + | |
278 | 282 |
| |
279 | 283 |
| |
280 | 284 |
| |
| |||
2143 | 2147 |
| |
2144 | 2148 |
| |
2145 | 2149 |
| |
2146 |
| - | |
2147 |
| - | |
| 2150 | + | |
| 2151 | + | |
2148 | 2152 |
| |
2149 | 2153 |
| |
2150 | 2154 |
| |
| |||
2154 | 2158 |
| |
2155 | 2159 |
| |
2156 | 2160 |
| |
2157 |
| - | |
| 2161 | + | |
2158 | 2162 |
| |
2159 | 2163 |
| |
2160 | 2164 |
| |
| |||
3171 | 3175 |
| |
3172 | 3176 |
| |
3173 | 3177 |
| |
| 3178 | + | |
3174 | 3179 |
| |
3175 | 3180 |
| |
3176 | 3181 |
| |
| |||
3255 | 3260 |
| |
3256 | 3261 |
| |
3257 | 3262 |
| |
3258 |
| - | |
| 3263 | + | |
| 3264 | + | |
3259 | 3265 |
| |
3260 | 3266 |
| |
3261 |
| - | |
3262 |
| - | |
| 3267 | + | |
| 3268 | + | |
3263 | 3269 |
| |
3264 | 3270 |
| |
3265 | 3271 |
| |
3266 | 3272 |
| |
| 3273 | + | |
| 3274 | + | |
| 3275 | + | |
3267 | 3276 |
| |
3268 | 3277 |
| |
3269 | 3278 |
| |
| |||
3299 | 3308 |
| |
3300 | 3309 |
| |
3301 | 3310 |
| |
3302 |
| - | |
| 3311 | + | |
| 3312 | + | |
| 3313 | + | |
| 3314 | + | |
3303 | 3315 |
| |
3304 | 3316 |
| |
3305 | 3317 |
| |
3306 | 3318 |
| |
| 3319 | + | |
| 3320 | + | |
| 3321 | + | |
| 3322 | + | |
3307 | 3323 |
| |
3308 | 3324 |
| |
3309 | 3325 |
| |
| |||
3435 | 3451 |
| |
3436 | 3452 |
| |
3437 | 3453 |
| |
| 3454 | + | |
3438 | 3455 |
| |
3439 | 3456 |
| |
3440 | 3457 |
| |
| |||
3511 | 3528 |
| |
3512 | 3529 |
| |
3513 | 3530 |
| |
3514 |
| - | |
| 3531 | + | |
3515 | 3532 |
| |
3516 |
| - | |
| 3533 | + | |
| 3534 | + | |
| 3535 | + | |
3517 | 3536 |
| |
3518 | 3537 |
| |
3519 | 3538 |
| |
|
Lines changed: 40 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
67 | 67 |
| |
68 | 68 |
| |
69 | 69 |
| |
| 70 | + | |
70 | 71 |
| |
71 | 72 |
| |
72 | 73 |
| |
| |||
81 | 82 |
| |
82 | 83 |
| |
83 | 84 |
| |
| 85 | + | |
84 | 86 |
| |
85 | 87 |
| |
86 | 88 |
| |
| |||
203 | 205 |
| |
204 | 206 |
| |
205 | 207 |
| |
| 208 | + | |
206 | 209 |
| |
207 | 210 |
| |
208 | 211 |
| |
| |||
1476 | 1479 |
| |
1477 | 1480 |
| |
1478 | 1481 |
| |
| 1482 | + | |
1479 | 1483 |
| |
1480 | 1484 |
| |
1481 | 1485 |
| |
| |||
1528 | 1532 |
| |
1529 | 1533 |
| |
1530 | 1534 |
| |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
1531 | 1547 |
| |
1532 | 1548 |
| |
1533 | 1549 |
| |
| |||
1599 | 1615 |
| |
1600 | 1616 |
| |
1601 | 1617 |
| |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
1602 | 1623 |
| |
1603 | 1624 |
| |
1604 | 1625 |
| |
| |||
1609 | 1630 |
| |
1610 | 1631 |
| |
1611 | 1632 |
| |
| 1633 | + | |
1612 | 1634 |
| |
1613 | 1635 |
| |
1614 | 1636 |
| |
| |||
1637 | 1659 |
| |
1638 | 1660 |
| |
1639 | 1661 |
| |
| 1662 | + | |
| 1663 | + | |
1640 | 1664 |
| |
1641 | 1665 |
| |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
1642 | 1674 |
| |
1643 | 1675 |
| |
1644 | 1676 |
| |
| |||
1769 | 1801 |
| |
1770 | 1802 |
| |
1771 | 1803 |
| |
| 1804 | + | |
1772 | 1805 |
| |
1773 | 1806 |
| |
1774 | 1807 |
| |
| |||
1830 | 1863 |
| |
1831 | 1864 |
| |
1832 | 1865 |
| |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
1833 | 1869 |
| |
1834 | 1870 |
| |
1835 | 1871 |
| |
1836 | 1872 |
| |
1837 | 1873 |
| |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
1838 | 1878 |
| |
1839 | 1879 |
| |
1840 | 1880 |
| |
|
Lines changed: 11 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
| 46 | + | |
46 | 47 |
| |
47 | 48 |
| |
48 | 49 |
| |
| |||
996 | 997 |
| |
997 | 998 |
| |
998 | 999 |
| |
999 |
| - | |
| 1000 | + | |
| 1001 | + | |
1000 | 1002 |
| |
1001 | 1003 |
| |
1002 | 1004 |
| |
| |||
1252 | 1254 |
| |
1253 | 1255 |
| |
1254 | 1256 |
| |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
1255 | 1265 |
| |
1256 | 1266 |
| |
1257 | 1267 |
| |
|
Lines changed: 9 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
| 28 | + | |
28 | 29 |
| |
29 | 30 |
| |
30 | 31 |
| |
| |||
108 | 109 |
| |
109 | 110 |
| |
110 | 111 |
| |
111 |
| - | |
| 112 | + | |
112 | 113 |
| |
113 | 114 |
| |
114 | 115 |
| |
| |||
448 | 449 |
| |
449 | 450 |
| |
450 | 451 |
| |
| 452 | + | |
451 | 453 |
| |
452 | 454 |
| |
453 | 455 |
| |
| |||
457 | 459 |
| |
458 | 460 |
| |
459 | 461 |
| |
460 |
| - | |
| 462 | + | |
461 | 463 |
| |
462 |
| - | |
| 464 | + | |
463 | 465 |
| |
464 | 466 |
| |
465 | 467 |
| |
| |||
482 | 484 |
| |
483 | 485 |
| |
484 | 486 |
| |
485 |
| - | |
| 487 | + | |
486 | 488 |
| |
487 | 489 |
| |
488 | 490 |
| |
| |||
635 | 637 |
| |
636 | 638 |
| |
637 | 639 |
| |
| 640 | + | |
| 641 | + | |
| 642 | + | |
638 | 643 |
| |
639 | 644 |
| |
640 | 645 |
| |
|
0 commit comments
Comments
(0)