forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc1b6d49
Fix pg_stat_io buffer reuse test instability
The stats regression test attempts to ensure that Buffer Access Strategy"reuses" are being counted in pg_stat_io by vacuuming a table which is largerthan the size of the strategy ring. However, when shared buffers are insufficiently high demand, another backend could evict one of the blocks in thestrategy ring before the first backend has a chance to reuse the buffer. Thebackend using the strategy would then evict another shared buffer and add thatbuffer to the strategy ring. This counts as an eviction and not a reuse inpg_stat_io. Count both evictions and reuses in the test to ensure it does notfail incorrectly.Reported-by: Jeff Davis <pgsql@j-davis.com>,Author: Melanie Plageman <melanieplageman@gmail.com>Reviewed-by: Alexander Lakhin <exclusion@gmail.com>Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>Discussion:https://postgr.es/m/CAAKRu_bNG27AxG9TdPtwsL6wg8AWbVckjmTL2t1HF=miDQuNtw@mail.gmail.com1 parent4a095e9 commitc1b6d49
2 files changed
+32
-17
lines changedLines changed: 20 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1385 | 1385 |
| |
1386 | 1386 |
| |
1387 | 1387 |
| |
1388 |
| - | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
1389 | 1393 |
| |
1390 | 1394 |
| |
1391 | 1395 |
| |
1392 | 1396 |
| |
1393 | 1397 |
| |
1394 | 1398 |
| |
1395 | 1399 |
| |
1396 |
| - | |
| 1400 | + | |
1397 | 1401 |
| |
1398 | 1402 |
| |
1399 | 1403 |
| |
1400 | 1404 |
| |
1401 | 1405 |
| |
1402 | 1406 |
| |
1403 |
| - | |
1404 |
| - | |
| 1407 | + | |
| 1408 | + | |
1405 | 1409 |
| |
1406 | 1410 |
| |
1407 | 1411 |
| |
1408 | 1412 |
| |
1409 | 1413 |
| |
1410 | 1414 |
| |
1411 | 1415 |
| |
1412 |
| - | |
| 1416 | + | |
1413 | 1417 |
| |
1414 |
| - | |
1415 |
| - | |
1416 |
| - | |
1417 |
| - | |
1418 |
| - | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
1419 | 1429 |
| |
1420 | 1430 |
| |
1421 | 1431 |
| |
|
Lines changed: 12 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
678 | 678 |
| |
679 | 679 |
| |
680 | 680 |
| |
681 |
| - | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
682 | 686 |
| |
683 | 687 |
| |
684 | 688 |
| |
| |||
687 | 691 |
| |
688 | 692 |
| |
689 | 693 |
| |
690 |
| - | |
| 694 | + | |
691 | 695 |
| |
692 | 696 |
| |
693 | 697 |
| |
694 | 698 |
| |
695 | 699 |
| |
696 | 700 |
| |
697 |
| - | |
698 |
| - | |
| 701 | + | |
| 702 | + | |
699 | 703 |
| |
700 | 704 |
| |
701 |
| - | |
| 705 | + | |
702 | 706 |
| |
703 |
| - | |
704 |
| - | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
705 | 710 |
| |
706 | 711 |
| |
707 | 712 |
| |
|
0 commit comments
Comments
(0)