Re: [PATCH] Microvacuum for gist.
От | Teodor Sigaev |
---|---|
Тема | Re: [PATCH] Microvacuum for gist. |
Дата | |
Msg-id | 55FAEDF4.4020609@sigaev.ru обсуждение исходный текст |
Ответ на | Re: [PATCH] Microvacuum for gist. (Jeff Janes <jeff.janes@gmail.com>) |
Список | pgsql-hackers |
> 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/
В списке pgsql-hackers по дате отправления: