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