Re: some question about _bt_getbuf

Поиск
Список
Период
Сортировка
От Kyotaro HORIGUCHI
Тема Re: some question about _bt_getbuf
Дата
Msg-id 20180626.190018.43261627.horiguchi.kyotaro@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re:Re: some question about _bt_getbuf  ("Imai, Yoshikazu" <imai.yoshikazu@jp.fujitsu.com>)
Список pgsql-hackers
Hello, thank you for reprising this thread.

This issue is technically disucssed in the thread Tom suggested
upthread.

https://www.postgresql.org/message-id/flat/2628.1474272158%40localhost

At Tue, 26 Jun 2018 08:09:18 +0000, "Imai, Yoshikazu" <imai.yoshikazu@jp.fujitsu.com> wrote in
<0F97FA9ABBDBE54F91744A9B37151A5116E4DD@g01jpexmbkw24>
> Hi,
> 
> > At 2018-05-15 01:49:41, "Tom Lane" <tgl@sss.pgh.pa.us> wrote:
> > >=?GBK?B?19S8ug==?= <zoulx1982@163.com> writes:
> > >> i run test using pg10.0 on my machine, and the program crashed on _bt_getbuf.
> > >> And i found the following code:
> > >> the routine _bt_page_recyclable say maybe the page is all-zero page,
> > >> if so then the code run (BTPageOpaque) PageGetSpecialPointer(page);
> > >> it will be failed because it access invalid memory.
> > >> I don't know whether it is so. Look forward t your reply, thanks.
> > >
> > >This code's clearly broken, as was discussed before:
> > >
> > >https://www.postgresql.org/message-id/flat/2628.1474272158%40localhost
> > >
> > >but nothing was done about it, perhaps partly because we didn't have a
> > >reproducible test case.  Do you have one?
> > >
> > >            regards, tom lane
> > 
> > Unfortunately, I don't have a complete test case.
> 
> I recently checked about this code and previous discussion and tried to occur a crash.
> I will describe how to occur a crash in the last of this mail, but I don't know whether it is useful because I used
gdbto occur a crash, that it is not actually a reproducible test case.
 
> 
> As was discussed before, this crash happens when recycling an all-zeroes page in an index.
> Referring to below comments in code, an all-zeroes page is created when backend downs in the split process after
extendingthe index's relation to get a new page and before making WAL entries for that.
 

I'm not sure if there's no other cases to create such pages but
at least your steps does as mentioned in the comment of
_bt_page_recyclable(). And I agree to Amit's diagnosis and Tom's
solution.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



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

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: ssl_library parameter
Следующее
От: "Ideriha, Takeshi"
Дата:
Сообщение: RE: ON CONFLICT DO NOTHING on pg_dump