forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit17e0328
committed
Allow pg_stat_statements to track planning statistics.
This commit makes pg_stat_statements support new GUCpg_stat_statements.track_planning. If this option is enabled,pg_stat_statements tracks the planning statistics of the statements,e.g., the number of times the statement was planned, the total timespent planning the statement, etc. This feature is useful to checkthe statements that it takes a long time to plan. Previously sincepg_stat_statements tracked only the execution statistics, we couldnot use that for the purpose.The planning and execution statistics are stored at the end ofeach phase separately. So there are not always one-to-one relationshipbetween them. For example, if the statement is successfully plannedbut fails in the execution phase, only its planning statistics are stored.This may cause the users to be able to see different pg_stat_statementsresults from the previous version. To avoid this,pg_stat_statements.track_planning needs to be disabled.This commit bumps the version of pg_stat_statements to 1.8since it changes the definition of pg_stat_statements function.Author: Julien Rouhaud, Pascal Legrand, Thomas Munro, Fujii MasaoReviewed-by: Sergei Kornilov, Tomas Vondra, Yoshikazu Imai, Haribabu Kommi, Tom LaneDiscussion:https://postgr.es/m/CAHGQGwFx_=DO-Gu-MfPW3VQ4qC7TfVdH2zHmvZfrGv6fQ3D-Tw@mail.gmail.comDiscussion:https://postgr.es/m/CAEepm=0e59Y_6Q_YXYCTHZkqOc6H2pJ54C_Xe=VFu50Aqqp_sA@mail.gmail.comDiscussion:https://postgr.es/m/DB6PR0301MB21352F6210E3B11934B0DCC790B00@DB6PR0301MB2135.eurprd03.prod.outlook.com1 parent28cac71 commit17e0328
File tree
8 files changed
+603
-223
lines changed- contrib/pg_stat_statements
- expected
- sql
- doc/src/sgml
- src/tools/pgindent
8 files changed
+603
-223
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
| 10 | + | |
10 | 11 |
| |
11 | 12 |
| |
12 | 13 |
| |
|
Lines changed: 152 additions & 79 deletions
Large diffs are not rendered by default.
Lines changed: 55 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + |
0 commit comments
Comments
(0)