Re: WIP: store additional info in GIN index

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: WIP: store additional info in GIN index
Дата
Msg-id 50BAA897.2040303@fuzzy.cz
обсуждение исходный текст
Ответ на WIP: store additional info in GIN index  (Alexander Korotkov <aekorotkov@gmail.com>)
Ответы Re: WIP: store additional info in GIN index
Список pgsql-hackers
On 18.11.2012 22:54, Alexander Korotkov wrote:
> Hackers,
>
> Patch completely changes storage in posting lists and leaf pages of
> posting trees. It uses varbyte encoding for BlockNumber and
> OffsetNumber. BlockNumber are stored incremental in page. Additionally
> one bit of OffsetNumber is reserved for additional information NULL
> flag. To be able to find position in leaf data page quickly patch
> introduces small index in the end of page.

Hi,

I've tried to apply the patch with the current HEAD, but I'm getting
segfaults whenever VACUUM runs (either called directly or from autovac
workers).

The patch applied cleanly against 9b3ac49e and needed a minor fix when
applied on HEAD (because of an assert added to ginRedoCreatePTree), but
that shouldn't be a problem.

The backtrace always looks like this:

Program received signal SIGSEGV, Segmentation fault.
0x00000000004dea3b in processPendingPage (accum=0x7fff15ab8aa0,
ka=0x7fff15ab8a70, page=0x7f88774a7ea0 "", startoff=1) at ginfast.c:785
785                             addInfo = index_getattr(itup, 2,
accum->ginstate->tupdesc[curattnum - 1], &addInfoIsNull);
(gdb) bt
#0  0x00000000004dea3b in processPendingPage (accum=0x7fff15ab8aa0,
ka=0x7fff15ab8a70, page=0x7f88774a7ea0 "", startoff=1) at ginfast.c:785
#1  0x00000000004df3c6 in ginInsertCleanup (ginstate=0x7fff15ab97c0,
vac_delay=1 '\001', stats=0xfb0050) at ginfast.c:909
#2  0x00000000004dbe8c in ginbulkdelete (fcinfo=0x7fff15abbfb0) at
ginvacuum.c:747



Reproducing the issue is quite simple:

1) create table messages (id int, txt text, ts tsvector);
2) insert into messages select i, substr(md5(i::text), 0, 4),             to_tsvector('english',  substr(md5(i::text),
0,4))             from generate_series(1,100000) s(i);
 
3) vacuum messages
4) ... segfault :-(

regards
Tomas



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] make -jN check fails / unset MAKEFLAGS in pg_regress.c
Следующее
От: Noah Misch
Дата:
Сообщение: Re: ALTER TABLE ... NOREWRITE option