> But I don't understand this comment:
>
> + /*
> + * While we delete only one tuple at once we could mix calls
> + * PageIndexTupleDelete() here and PageIndexMultiDelete() in
> + * gistRedoPageUpdateRecord()
> + */
>
> Does this mean:
>
> Since we delete only one tuple per WAL record here, we can call
> PageIndexTupleDelete() here and re-play it with PageIndexMultiDelete() in
> gistRedoPageUpdateRecord()
yes. The problem was when we delete tuples with offset (2,4,6) with
PageIndexMultiDelete() we will delete exctly pointed tuples. Bur if we delete
tuple by PageIndexTupleDelete() with offset 2 then 4-th tuple will be moved 3 3
and 6 become 5. So, next tuple to delete now is 3 and we should call
PageIndexTupleDelete(3) and so on. And bug was: we deleted tuples in
ginpagevacuum with a help of PageIndexMultiDelete() and write to WAL his
argument, and recovery process uses PageIndexTupleDelete() without correcting
offset.
--
Teodor Sigaev E-mail: teodor@sigaev.ru
WWW: http://www.sigaev.ru/