Re: BUG #15540: Use after release in ExecuteTruncateGuts

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BUG #15540: Use after release in ExecuteTruncateGuts
Дата
Msg-id 20181207172246.3bdayfkuni6cbqks@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: BUG #15540: Use after release in ExecuteTruncateGuts  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On 2018-Dec-07, Tom Lane wrote:

> =?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:
> > The function ExecuteTruncateGuts drops the reference to rel via
> > relation_close when toast_relid is valid. However, after that, rel is passed
> > to pgstat_count_truncate. This may result in a use-after-release bug.
> 
> ... and, even more to the point, the truncation stats count is incorrectly
> applied to the toast table not its parent.

Whoops!  Thanks for fixing.  You're right, we quite likely didn't
specifically test the case of there being a toast table.  Amazing that
it took so long to find it.

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


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #15540: Use after release in ExecuteTruncateGuts
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #15541: Use after release in PQprint