Re: GIN improvements part 1: additional information

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: GIN improvements part 1: additional information
Дата
Msg-id CAPpHfdvku_rgziJ0GB_JeNszNNeZ8LqOZ1A1-P1ycr3urK0hdA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: GIN improvements part 1: additional information  (Alexander Korotkov <aekorotkov@gmail.com>)
Список pgsql-hackers
On Tue, Jan 21, 2014 at 4:28 PM, Alexander Korotkov <aekorotkov@gmail.com> wrote:
I noticed that the gin vacuum redo routine is dead code, except for the data-leaf page handling, because we never remove entries or internal nodes (page deletion is a separate wal record type). And the data-leaf case is functionally equivalent to heap newpage records. I removed the dead code and made it more clear that it resembles heap newpage.

Attached is a yet another version, with more bugs fixed and more comments added and updated. I would appreciate some heavy-testing of this patch now. If you could re-run the tests you've been using, that could be great. I've tested the WAL replay by replicating GIN operations over streaming replication. That doesn't guarantee it's correct, but it's a good smoke test.

I tried my test-suite but it hangs on index scan with infinite loop. I re-tried it on my laptop with -O0. I found it to crash on update and vacuum in some random places like:
Assert(GinPageIsData(page)); in xlogVacuumPage
Assert(ndecoded == totalpacked); in ginCompressPostingList
Trying to debug it.

Another question is about dataPlaceToPageLeaf:

while ((Pointer) seg < segend)
{
    if (ginCompareItemPointers(&minNewItem, &seg->first) < 0)
        break;

Shouldn't we adjust seg to previous segment? If minNewItem is less than seg->first we should insert it to previous segment.

------
With best regards,
Alexander Korotkov.  

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: REINDEX CONCURRENTLY 2.0
Следующее
От: "MauMau"
Дата:
Сообщение: Re: [bug fix] pg_ctl always uses the same event source