forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit11c34b3
committed
Show parameters of CALL as constants in pg_stat_statements
This commit changes the query jumbling of CallStmt so as its IN/OUTparameters are able to show up as constants with a parameter symbol inpg_stat_statements, like:CALL proc1($1, $2);CALL proc2($1, $2, $3);The transformed FuncExpr is used in the query ID computation instead ofthe FuncCall generated by the parser, so as it is sensitive to the OIDof the procedure and its list of input arguments. The output argumentsare handled in a separate list in CallStmt, which is also included inthe computation.Tests are added to pg_stat_statements to show how this affects CALL withIN/OUT parameters as well as overloaded functions.Like638d42a or31de7e6, this improves the monitoring ofworkloads with a lot of CALL statements, preventing unnecessary bloatwhen these use different input (or event output) values.Author: Sami ImseihDiscussion:https://postgr.es/m/B44FA29D-EBD0-4DD9-ABC2-16F1CB087074@amazon.com1 parentd060e92 commit11c34b3
File tree
3 files changed
+70
-8
lines changed- contrib/pg_stat_statements
- expected
- sql
- src/include/nodes
3 files changed
+70
-8
lines changedLines changed: 41 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
300 | 300 |
| |
301 | 301 |
| |
302 | 302 |
| |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
303 | 324 |
| |
304 | 325 |
| |
305 | 326 |
| |
| |||
310 | 331 |
| |
311 | 332 |
| |
312 | 333 |
| |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
313 | 348 |
| |
314 | 349 |
| |
315 | 350 |
| |
316 |
| - | |
317 |
| - | |
318 |
| - | |
319 |
| - | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
320 | 356 |
| |
321 |
| - | |
| 357 | + | |
322 | 358 |
| |
323 | 359 |
| |
324 | 360 |
| |
|
Lines changed: 25 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
164 | 164 |
| |
165 | 165 |
| |
166 | 166 |
| |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
167 | 188 |
| |
168 | 189 |
| |
169 | 190 |
| |
170 | 191 |
| |
171 | 192 |
| |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
172 | 197 |
| |
173 | 198 |
| |
174 | 199 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3376 | 3376 |
| |
3377 | 3377 |
| |
3378 | 3378 |
| |
3379 |
| - | |
| 3379 | + | |
| 3380 | + | |
3380 | 3381 |
| |
3381 |
| - | |
| 3382 | + | |
3382 | 3383 |
| |
3383 |
| - | |
| 3384 | + | |
3384 | 3385 |
| |
3385 | 3386 |
| |
3386 | 3387 |
| |
|
0 commit comments
Comments
(0)