forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit593a963
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 parent9789c99 commit593a963
1 file changed
+3
-4
lines changedLines changed: 3 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
841 | 841 |
| |
842 | 842 |
| |
843 | 843 |
| |
844 |
| - | |
845 |
| - | |
| 844 | + | |
| 845 | + | |
846 | 846 |
| |
847 |
| - | |
848 |
| - | |
849 | 847 |
| |
850 | 848 |
| |
851 | 849 |
| |
| |||
854 | 852 |
| |
855 | 853 |
| |
856 | 854 |
| |
| 855 | + | |
857 | 856 |
| |
858 | 857 |
| |
859 | 858 |
| |
|
0 commit comments
Comments
(0)