Commit 5c71362
Amit Kapila
Allow parallel create index to accumulate buffer usage stats.
Currently, we don't account for buffer usage incurred by parallel workers
for parallel create index. This commit allows each worker to record the
buffer usage stats and leader backend to accumulate that stats at the
end of the operation. This will allow pg_stat_statements to display
correct buffer usage stats for (parallel) create index command.
Reported-by: Julien Rouhaud
Author: Sawada Masahiko
Reviewed-by: Dilip Kumar, Julien Rouhaud and Amit Kapila
Backpatch-through: 11, where this was introduced
Discussion: https://postgr.es/m/20200328151721.GB12854@nol1 parent 58ad961 commit 5c71362
2 files changed
+28
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
| 198 | + | |
197 | 199 | | |
198 | 200 | | |
199 | 201 | | |
| |||
1457 | 1459 | | |
1458 | 1460 | | |
1459 | 1461 | | |
| 1462 | + | |
1460 | 1463 | | |
1461 | 1464 | | |
1462 | 1465 | | |
| |||
1510 | 1513 | | |
1511 | 1514 | | |
1512 | 1515 | | |
1513 | | - | |
| 1516 | + | |
| 1517 | + | |
1514 | 1518 | | |
1515 | | - | |
1516 | | - | |
1517 | | - | |
1518 | | - | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
1519 | 1522 | | |
1520 | 1523 | | |
1521 | 1524 | | |
1522 | 1525 | | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
1523 | 1529 | | |
1524 | 1530 | | |
1525 | 1531 | | |
| |||
1592 | 1598 | | |
1593 | 1599 | | |
1594 | 1600 | | |
1595 | | - | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
1596 | 1605 | | |
1597 | 1606 | | |
1598 | 1607 | | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
1599 | 1611 | | |
1600 | 1612 | | |
1601 | 1613 | | |
| |||
1608 | 1620 | | |
1609 | 1621 | | |
1610 | 1622 | | |
| 1623 | + | |
1611 | 1624 | | |
1612 | 1625 | | |
1613 | 1626 | | |
| |||
1646 | 1659 | | |
1647 | 1660 | | |
1648 | 1661 | | |
1649 | | - | |
| 1662 | + | |
1650 | 1663 | | |
1651 | 1664 | | |
1652 | 1665 | | |
| |||
1779 | 1792 | | |
1780 | 1793 | | |
1781 | 1794 | | |
| 1795 | + | |
1782 | 1796 | | |
1783 | 1797 | | |
1784 | 1798 | | |
| |||
1848 | 1862 | | |
1849 | 1863 | | |
1850 | 1864 | | |
1851 | | - | |
| 1865 | + | |
| 1866 | + | |
1852 | 1867 | | |
1853 | | - | |
| 1868 | + | |
| 1869 | + | |
1854 | 1870 | | |
1855 | 1871 | | |
1856 | 1872 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
| 191 | + | |
| 192 | + | |
196 | 193 | | |
197 | 194 | | |
198 | 195 | | |
| |||
201 | 198 | | |
202 | 199 | | |
203 | 200 | | |
204 | | - | |
205 | | - | |
| 201 | + | |
206 | 202 | | |
207 | 203 | | |
208 | 204 | | |
| |||
0 commit comments