Commit 2e0fedf
committed
pg_stat_statements: Track time at which all statistics were last reset.
This commit adds "stats_reset" column into the pg_stat_statements_info
view. This column indicates the time at which all statistics in the
pg_stat_statements view were last reset.
Per discussion, this commit also changes pg_stat_statements_info code
so that "dealloc" column is reset at the same time as "stats_reset" is reset,
i.e., whenever all pg_stat_statements entries are removed, for the sake
of consistency. Previously "dealloc" was reset only when
pg_stat_statements_reset(0, 0, 0) is called and was not reset when
pg_stat_statements_reset() with non-zero value argument discards all
entries. This was confusing.
Author: Naoki Nakamichi, Yuki Seino
Reviewed-by: Yuki Seino, Kyotaro Horiguchi, Li Japin, Fujii Masao
Discussion: https://postgr.es/m/c102cf3180d0ee73c1c5a0f7f8558322@oss.nttdata.com1 parent 00f690a commit 2e0fedf
File tree
3 files changed
+53
-16
lines changed- contrib/pg_stat_statements
- doc/src/sgml
3 files changed
+53
-16
lines changedLines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | | - | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
101 | | - | |
| 102 | + | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| |||
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
| 203 | + | |
202 | 204 | | |
203 | 205 | | |
204 | 206 | | |
| |||
565 | 567 | | |
566 | 568 | | |
567 | 569 | | |
| 570 | + | |
568 | 571 | | |
569 | 572 | | |
570 | 573 | | |
| |||
1881 | 1884 | | |
1882 | 1885 | | |
1883 | 1886 | | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
1884 | 1890 | | |
1885 | 1891 | | |
1886 | 1892 | | |
1887 | 1893 | | |
1888 | 1894 | | |
1889 | 1895 | | |
1890 | 1896 | | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
1891 | 1907 | | |
1892 | 1908 | | |
1893 | 1909 | | |
| |||
1898 | 1914 | | |
1899 | 1915 | | |
1900 | 1916 | | |
1901 | | - | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
1902 | 1921 | | |
1903 | 1922 | | |
1904 | 1923 | | |
| |||
2551 | 2570 | | |
2552 | 2571 | | |
2553 | 2572 | | |
2554 | | - | |
2555 | | - | |
2556 | | - | |
2557 | | - | |
2558 | | - | |
2559 | | - | |
2560 | | - | |
2561 | | - | |
2562 | | - | |
2563 | 2573 | | |
2564 | 2574 | | |
2565 | 2575 | | |
2566 | 2576 | | |
2567 | 2577 | | |
2568 | 2578 | | |
| 2579 | + | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
2569 | 2593 | | |
2570 | 2594 | | |
2571 | 2595 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
526 | 536 | | |
527 | 537 | | |
528 | 538 | | |
| |||
549 | 559 | | |
550 | 560 | | |
551 | 561 | | |
552 | | - | |
553 | | - | |
554 | | - | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
555 | 567 | | |
556 | 568 | | |
557 | 569 | | |
| |||
0 commit comments