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

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [BUGS] BUG #14668: BRIN open autosummarize=on , database willcrash
Дата
Msg-id 20170530221955.cdldd7bz77neabi5@alvherre.pgsql
обсуждение исходный текст
Ответ на 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 will crash  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список pgsql-bugs
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 по дате отправления:

Предыдущее
От: Justin Muise
Дата:
Сообщение: Re: [BUGS] BUG #14662: 'has_table_privilege()' function fails witherror, "invalid name syntax" when using Japanese symbols
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [BUGS] [PATCH] Fixed malformed error message on malformed SCRAM message.