forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6182e01
committed
Don't clear btpo_cycleid during _bt_vacuum_one_page.
When "vacuuming" a single btree page by removing LP_DEAD tuples, we are notactually within a vacuum operation, but rather in an ordinary insertionprocess that could well be running concurrently with a vacuum. So clearingthe cycleid is incorrect, and could cause the concurrent vacuum to missremoving tuples that it needs to remove. This is a longstanding bugintroduced by commite628464 of2006-07-25. I believe it explains Maxim Boguk's recent report of indexcorruption, and probably some other previously unexplained reports.In 9.0 and up this is a one-line fix; before that we need to introduce aflag to tell _bt_delitems what to do.1 parent3d2aa2c commit6182e01
1 file changed
+3
-4
lines changedLines changed: 3 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
829 | 829 |
| |
830 | 830 |
| |
831 | 831 |
| |
832 |
| - | |
833 |
| - | |
| 832 | + | |
| 833 | + | |
834 | 834 |
| |
835 |
| - | |
836 |
| - | |
837 | 835 |
| |
838 | 836 |
| |
839 | 837 |
| |
| |||
842 | 840 |
| |
843 | 841 |
| |
844 | 842 |
| |
| 843 | + | |
845 | 844 |
| |
846 | 845 |
| |
847 | 846 |
| |
|
0 commit comments
Comments
(0)