forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb68b29b
committed
Use pgstat_kind_infos to write fixed shared statistics
This is similar to9004abf, but this time for the write part of thestats file. The code is changed so as, rather than referring toindividual members of PgStat_Snapshot in an order based on theirPgStat_Kind value, a loop based on pgstat_kind_infos is used to retrievethe contents to write from the snapshot structure, for a size ofPgStat_KindInfo's shared_data_len.This requires the addition to PgStat_KindInfo of an offset to track thelocation of each fixed-numbered stats in PgStat_Snapshot. This changeis useful to make this area of the code more easily pluggable, andreduces the knowledge of specific fixed-numbered kinds in pgstat.c.Reviewed-by: Bertrand DrouvotDiscussion:https://postgr.es/m/Zot5bxoPYdS7yaoy@paquier.xyz1 parentc048cd9 commitb68b29b
File tree
2 files changed
+24
-38
lines changed- src
- backend/utils/activity
- include/utils
2 files changed
+24
-38
lines changedLines changed: 18 additions & 38 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
349 | 349 |
| |
350 | 350 |
| |
351 | 351 |
| |
| 352 | + | |
352 | 353 |
| |
353 | 354 |
| |
354 | 355 |
| |
| |||
362 | 363 |
| |
363 | 364 |
| |
364 | 365 |
| |
| 366 | + | |
365 | 367 |
| |
366 | 368 |
| |
367 | 369 |
| |
| |||
375 | 377 |
| |
376 | 378 |
| |
377 | 379 |
| |
| 380 | + | |
378 | 381 |
| |
379 | 382 |
| |
380 | 383 |
| |
| |||
388 | 391 |
| |
389 | 392 |
| |
390 | 393 |
| |
| 394 | + | |
391 | 395 |
| |
392 | 396 |
| |
393 | 397 |
| |
| |||
401 | 405 |
| |
402 | 406 |
| |
403 | 407 |
| |
| 408 | + | |
404 | 409 |
| |
405 | 410 |
| |
406 | 411 |
| |
| |||
414 | 419 |
| |
415 | 420 |
| |
416 | 421 |
| |
| 422 | + | |
417 | 423 |
| |
418 | 424 |
| |
419 | 425 |
| |
| |||
1371 | 1377 |
| |
1372 | 1378 |
| |
1373 | 1379 |
| |
1374 |
| - | |
1375 |
| - | |
1376 |
| - | |
1377 |
| - | |
1378 |
| - | |
1379 |
| - | |
1380 |
| - | |
1381 |
| - | |
1382 |
| - | |
1383 |
| - | |
1384 |
| - | |
1385 |
| - | |
1386 |
| - | |
1387 |
| - | |
1388 |
| - | |
1389 |
| - | |
1390 |
| - | |
1391 |
| - | |
1392 |
| - | |
1393 |
| - | |
1394 |
| - | |
1395 |
| - | |
1396 |
| - | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
1397 | 1385 |
| |
1398 |
| - | |
1399 |
| - | |
1400 |
| - | |
1401 |
| - | |
1402 |
| - | |
| 1386 | + | |
| 1387 | + | |
1403 | 1388 |
| |
1404 |
| - | |
1405 |
| - | |
1406 |
| - | |
1407 |
| - | |
1408 |
| - | |
| 1389 | + | |
1409 | 1390 |
| |
1410 |
| - | |
1411 |
| - | |
1412 |
| - | |
1413 |
| - | |
1414 |
| - | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
1415 | 1395 |
| |
1416 | 1396 |
| |
1417 | 1397 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
199 | 199 |
| |
200 | 200 |
| |
201 | 201 |
| |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
202 | 208 |
| |
203 | 209 |
| |
204 | 210 |
| |
|
0 commit comments
Comments
(0)