forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit28cac71
committed
Collect statistics about SLRU caches
There's a number of SLRU caches used to access important data like clog,commit timestamps, multixact, asynchronous notifications, etc. Until nowwe had no easy way to monitor these shared caches, compute hit ratios,number of reads/writes etc.This commit extends the statistics collector to track this informationfor a predefined list of SLRUs, and also introduces a new system viewpg_stat_slru displaying the data.The list of built-in SLRUs is fixed, but additional SLRUs may be definedin extensions. Unfortunately, there's no suitable registry of SLRUs, sothis patch simply defines a fixed list of SLRUs with entries for thebuilt-in ones and one entry for all additional SLRUs. Extensions addingtheir own SLRU are fairly rare, so this seems acceptable.This patch only allows monitoring of SLRUs, not tuning. The SLRU sizesare still fixed (hard-coded in the code) and it's not entirely clearwhich of the SLRUs might need a GUC to tune size. In a way, allowing usto determine that is one of the goals of this patch.Bump catversion as the patch introduces new functions and system view.Author: Tomas VondraReviewed-by: Alvaro HerreraDiscussion:https://www.postgresql.org/message-id/flat/20200119143707.gyinppnigokesjok@development1 parent17ca067 commit28cac71
File tree
9 files changed
+613
-1
lines changed- doc/src/sgml
- src
- backend
- access/transam
- catalog
- postmaster
- utils/adt
- include
- catalog
- test/regress/expected
9 files changed
+613
-1
lines changedLines changed: 97 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
575 | 575 |
| |
576 | 576 |
| |
577 | 577 |
| |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
578 | 585 |
| |
579 | 586 |
| |
580 | 587 |
| |
| |||
3259 | 3266 |
| |
3260 | 3267 |
| |
3261 | 3268 |
| |
| 3269 | + | |
| 3270 | + | |
| 3271 | + | |
| 3272 | + | |
| 3273 | + | |
| 3274 | + | |
| 3275 | + | |
| 3276 | + | |
| 3277 | + | |
| 3278 | + | |
| 3279 | + | |
| 3280 | + | |
| 3281 | + | |
| 3282 | + | |
| 3283 | + | |
| 3284 | + | |
| 3285 | + | |
| 3286 | + | |
| 3287 | + | |
| 3288 | + | |
| 3289 | + | |
| 3290 | + | |
| 3291 | + | |
| 3292 | + | |
| 3293 | + | |
| 3294 | + | |
| 3295 | + | |
| 3296 | + | |
| 3297 | + | |
| 3298 | + | |
| 3299 | + | |
| 3300 | + | |
| 3301 | + | |
| 3302 | + | |
| 3303 | + | |
| 3304 | + | |
| 3305 | + | |
| 3306 | + | |
| 3307 | + | |
| 3308 | + | |
| 3309 | + | |
| 3310 | + | |
| 3311 | + | |
| 3312 | + | |
| 3313 | + | |
| 3314 | + | |
| 3315 | + | |
| 3316 | + | |
| 3317 | + | |
| 3318 | + | |
| 3319 | + | |
| 3320 | + | |
| 3321 | + | |
| 3322 | + | |
| 3323 | + | |
| 3324 | + | |
| 3325 | + | |
| 3326 | + | |
| 3327 | + | |
| 3328 | + | |
| 3329 | + | |
| 3330 | + | |
| 3331 | + | |
| 3332 | + | |
| 3333 | + | |
| 3334 | + | |
| 3335 | + | |
| 3336 | + | |
| 3337 | + | |
| 3338 | + | |
3262 | 3339 |
| |
3263 | 3340 |
| |
3264 | 3341 |
| |
| |||
3383 | 3460 |
| |
3384 | 3461 |
| |
3385 | 3462 |
| |
| 3463 | + | |
| 3464 | + | |
| 3465 | + | |
| 3466 | + | |
| 3467 | + | |
| 3468 | + | |
| 3469 | + | |
| 3470 | + | |
| 3471 | + | |
| 3472 | + | |
| 3473 | + | |
| 3474 | + | |
| 3475 | + | |
| 3476 | + | |
| 3477 | + | |
| 3478 | + | |
| 3479 | + | |
| 3480 | + | |
| 3481 | + | |
| 3482 | + | |
3386 | 3483 |
| |
3387 | 3484 |
| |
3388 | 3485 |
| |
|
Lines changed: 23 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
286 | 286 |
| |
287 | 287 |
| |
288 | 288 |
| |
| 289 | + | |
| 290 | + | |
| 291 | + | |
289 | 292 |
| |
290 | 293 |
| |
291 | 294 |
| |
| |||
403 | 406 |
| |
404 | 407 |
| |
405 | 408 |
| |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
406 | 413 |
| |
407 | 414 |
| |
408 | 415 |
| |
| |||
444 | 451 |
| |
445 | 452 |
| |
446 | 453 |
| |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
447 | 458 |
| |
448 | 459 |
| |
449 | 460 |
| |
| |||
596 | 607 |
| |
597 | 608 |
| |
598 | 609 |
| |
| 610 | + | |
| 611 | + | |
| 612 | + | |
599 | 613 |
| |
600 | 614 |
| |
601 | 615 |
| |
| |||
730 | 744 |
| |
731 | 745 |
| |
732 | 746 |
| |
| 747 | + | |
| 748 | + | |
| 749 | + | |
733 | 750 |
| |
734 | 751 |
| |
735 | 752 |
| |
| |||
1125 | 1142 |
| |
1126 | 1143 |
| |
1127 | 1144 |
| |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
1128 | 1148 |
| |
1129 | 1149 |
| |
1130 | 1150 |
| |
| |||
1186 | 1206 |
| |
1187 | 1207 |
| |
1188 | 1208 |
| |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
1189 | 1212 |
| |
1190 | 1213 |
| |
1191 | 1214 |
| |
|
Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
793 | 793 |
| |
794 | 794 |
| |
795 | 795 |
| |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
796 | 809 |
| |
797 | 810 |
| |
798 | 811 |
| |
| |||
1410 | 1423 |
| |
1411 | 1424 |
| |
1412 | 1425 |
| |
| 1426 | + | |
1413 | 1427 |
| |
1414 | 1428 |
| |
1415 | 1429 |
| |
|
0 commit comments
Comments
(0)