Re: [BUGS] BUG #14668: BRIN open autosummarize=on , database willcrash

Поиск
Список
Период
Сортировка
Искать
От
Alvaro Herrera
Тема
Re: [BUGS] BUG #14668: BRIN open autosummarize=on , database willcrash
Дата
в 01:19:55
Msg-id
20170530221955.cdldd7bz77neabi5@alvherre.pgsql
Ответ на
Список
Дерево обсуждения
[BUGS] BUG #14668: BRIN open autosummarize=on , database will crash digoal@126.com
Re: [BUGS] BUG #14668: BRIN open autosummarize=on , database will crash Thomas Munro <thomas.munro@enterprisedb.com>
Re: [BUGS] BUG #14668: BRIN open autosummarize=on , database willcrash Alvaro Herrera <alvherre@2ndquadrant.com>
Re: [BUGS] BUG #14668: BRIN open autosummarize=on , database will crash Thomas Munro <thomas.munro@enterprisedb.com>
Thomas Munro wrote:

> I guess brin_free_tuple(lastPageTuple) should only be called if it's
> not NULL, so I guess brin.c lacks an "else" here:
> 
> -                       brin_free_tuple(lastPageTuple);
> +                       else
> +                               brin_free_tuple(lastPageTuple);
> 
> It doesn't crash for me with that change.

Pushed fix.  Actually that's not correct either, because tuples returned
by brinGetTupleForHeapBlock are not supposed to be freed at all since
they are shared buffer items.  The correct thing to do there was to
release the buffer lock ...

Thanks for the report and analysis.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
В списке pgsql-bugs по дате отправления
От: Michael Paquier
Дата:
FAQ