forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3e4b7d8
committed
Avoid pin scan for replay of XLOG_BTREE_VACUUM in all cases
Replay of XLOG_BTREE_VACUUM during Hot Standby was previously thought to requirecomplex interlocking that matched the requirements on the master. This requiredan O(N) operation that became a significant problem with large indexes, causingreplication delays of seconds or in some cases minutes while theXLOG_BTREE_VACUUM was replayed.This commit skips the pin scan that was previously required, by observing indetail when and how it is safe to do so, with full documentation. The pinscan is skipped only in replay; the VACUUM code path on master is nottouched here and WAL is identical.The current commit applies in all cases, effectively replacing commit687f2cd.1 parent3cc38ca commit3e4b7d8
3 files changed
+23
-35
lines changedLines changed: 6 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
525 | 525 |
| |
526 | 526 |
| |
527 | 527 |
| |
528 |
| - | |
529 |
| - | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
530 | 534 |
| |
531 | 535 |
| |
532 | 536 |
| |
| |||
536 | 540 |
| |
537 | 541 |
| |
538 | 542 |
| |
539 |
| - | |
540 |
| - | |
541 |
| - | |
542 |
| - | |
543 |
| - | |
544 |
| - | |
545 |
| - | |
546 | 543 |
| |
547 | 544 |
| |
548 | 545 |
| |
|
Lines changed: 9 additions & 23 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 |
| - | |
26 | 25 |
| |
27 | 26 |
| |
28 | 27 |
| |
| |||
833 | 832 |
| |
834 | 833 |
| |
835 | 834 |
| |
836 |
| - | |
837 |
| - | |
| 835 | + | |
838 | 836 |
| |
839 | 837 |
| |
840 | 838 |
| |
| |||
846 | 844 |
| |
847 | 845 |
| |
848 | 846 |
| |
849 |
| - | |
850 | 847 |
| |
851 | 848 |
| |
852 | 849 |
| |
| |||
1045 | 1042 |
| |
1046 | 1043 |
| |
1047 | 1044 |
| |
1048 |
| - | |
1049 |
| - | |
1050 |
| - | |
1051 |
| - | |
1052 |
| - | |
1053 |
| - | |
1054 |
| - | |
1055 |
| - | |
1056 |
| - | |
1057 |
| - | |
1058 |
| - | |
1059 |
| - | |
1060 |
| - | |
1061 |
| - | |
1062 | 1045 |
| |
1063 |
| - | |
1064 |
| - | |
1065 |
| - | |
1066 |
| - | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
1067 | 1053 |
| |
1068 | 1054 |
| |
1069 | 1055 |
| |
1070 | 1056 |
| |
1071 | 1057 |
| |
1072 | 1058 |
| |
1073 | 1059 |
| |
1074 |
| - | |
| 1060 | + | |
1075 | 1061 |
| |
1076 | 1062 |
| |
1077 | 1063 |
| |
|
Lines changed: 8 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
385 | 385 |
| |
386 | 386 |
| |
387 | 387 |
| |
388 |
| - | |
389 | 388 |
| |
390 | 389 |
| |
391 | 390 |
| |
| 391 | + | |
| 392 | + | |
392 | 393 |
| |
393 | 394 |
| |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
394 | 399 |
| |
395 | 400 |
| |
396 | 401 |
| |
397 |
| - | |
398 |
| - | |
| 402 | + | |
399 | 403 |
| |
400 | 404 |
| |
401 | 405 |
| |
| |||
458 | 462 |
| |
459 | 463 |
| |
460 | 464 |
| |
| 465 | + | |
461 | 466 |
| |
462 | 467 |
| |
463 | 468 |
| |
|
0 commit comments
Comments
(0)