forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbb45156
committed
Show names of DEALLOCATE as constants in pg_stat_statements
This commit switches query jumbling so as prepared statement names aretreated as constants in DeallocateStmt. A boolean field is added toDeallocateStmt to make a distinction between ALL and named preparedstatements, as "name" was used to make this difference before, NULLmeaning DEALLOCATE ALL.Prior to this commit, DEALLOCATE was not tracked in pg_stat_statements,for the reason that it was not possible to treat its name parameter as aconstant. Now that query jumbling applies to all the utility nodes,this reason does not apply anymore.Like638d42a, this can be a huge advantage for monitoring whereprepared statement names are randomly generated, preventing bloat inpg_stat_statements. A couple of tests are added to track the newbehavior.Author: Dagfinn Ilmari Mannsåker, Michael PaquierReviewed-by: Julien RouhaudDiscussion:https://postgr.es/m/ZMhT9kNtJJsHw6jK@paquier.xyz1 parente48b19c commitbb45156
File tree
5 files changed
+70
-8
lines changed- contrib/pg_stat_statements
- expected
- sql
- src
- backend/parser
- include/nodes
5 files changed
+70
-8
lines changedLines changed: 41 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
472 | 472 |
| |
473 | 473 |
| |
474 | 474 |
| |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
475 | 516 |
| |
476 | 517 |
| |
477 | 518 |
| |
|
Lines changed: 2 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
104 | 104 |
| |
105 | 105 |
| |
106 | 106 |
| |
107 |
| - | |
108 |
| - | |
| 107 | + | |
109 | 108 |
| |
110 | 109 |
| |
111 | 110 |
| |
| |||
830 | 829 |
| |
831 | 830 |
| |
832 | 831 |
| |
833 |
| - | |
834 |
| - | |
| 832 | + | |
835 | 833 |
| |
836 | 834 |
| |
837 | 835 |
| |
| |||
1116 | 1114 |
| |
1117 | 1115 |
| |
1118 | 1116 |
| |
1119 |
| - | |
1120 |
| - | |
1121 | 1117 |
| |
1122 | 1118 |
| |
1123 | 1119 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
237 | 237 |
| |
238 | 238 |
| |
239 | 239 |
| |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
240 | 253 |
| |
241 | 254 |
| |
242 | 255 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11953 | 11953 |
| |
11954 | 11954 |
| |
11955 | 11955 |
| |
| 11956 | + | |
| 11957 | + | |
11956 | 11958 |
| |
11957 | 11959 |
| |
11958 | 11960 |
| |
11959 | 11961 |
| |
11960 | 11962 |
| |
11961 | 11963 |
| |
11962 | 11964 |
| |
| 11965 | + | |
| 11966 | + | |
11963 | 11967 |
| |
11964 | 11968 |
| |
11965 | 11969 |
| |
11966 | 11970 |
| |
11967 | 11971 |
| |
11968 | 11972 |
| |
11969 | 11973 |
| |
| 11974 | + | |
| 11975 | + | |
11970 | 11976 |
| |
11971 | 11977 |
| |
11972 | 11978 |
| |
11973 | 11979 |
| |
11974 | 11980 |
| |
11975 | 11981 |
| |
11976 | 11982 |
| |
| 11983 | + | |
| 11984 | + | |
11977 | 11985 |
| |
11978 | 11986 |
| |
11979 | 11987 |
| |
|
Lines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3929 | 3929 |
| |
3930 | 3930 |
| |
3931 | 3931 |
| |
3932 |
| - | |
3933 |
| - | |
| 3932 | + | |
| 3933 | + | |
| 3934 | + | |
| 3935 | + | |
| 3936 | + | |
| 3937 | + | |
3934 | 3938 |
| |
3935 | 3939 |
| |
3936 | 3940 |
| |
|
0 commit comments
Comments
(0)