Re: Bug in ginRedoRecompress that causes opaque data on page to beoverrun
От | R, Siva |
---|---|
Тема | Re: Bug in ginRedoRecompress that causes opaque data on page to beoverrun |
Дата | |
Msg-id | 1536256940595.4374@amazon.com обсуждение исходный текст |
Ответ на | Re: Bug in ginRedoRecompress that causes opaque data on page to be overrun (Alexander Korotkov <a.korotkov@postgrespro.ru>) |
Ответы |
Re: Bug in ginRedoRecompress that causes opaque data on page to be overrun
|
Список | pgsql-hackers |
On Tue, Sep 6, 2018 at 09:53 AM, Alexander Korotkov <a.korotkov@postgrespro.ru> wrote: > With (fastupdate = on) GIN performs bulk update of posting lists, > inserting multiple tuples at once if possible. With (fastupdate = > off) GIN always inserts tuples one-by-one. It might be still possible > to reproduce the issue with (fastupdate = off), but it seems even > harder. Ah I see. This is cool, I will keep in mind for future testing. Thanks! > BTW, I've tried the patch you've posted. On my test case it fails > with following assertion. > TRAP: FailedAssertion("!(a_action == 2)", File: "ginxlog.c", Line: 243) > I thought about fixing this issue more, and I decided we can fix it in > less invasive way. Once modification is started we can copy tail of > the page into separately allocated chunk of memory, and the use it as > the source of original segments. See the patch attached. I'm also running into this assert with the workload, I think my patch is not handling the case where the action is add items on the last segment of the page correctly. I'm still investigating the issue further to find the source of the bug. Meanwhile I reviewed your patch and it looks good to me. I agree that copying out the entire tail out to the scratch space in one shot vs copying out every segment reduces the number of memcpy calls and simplifies the solution overall. Let us go ahead with this patch. Best Siva
В списке pgsql-hackers по дате отправления: