Re: BUG #15114: logical decoding Segmentation fault

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: BUG #15114: logical decoding Segmentation fault
Дата
Msg-id 56d0ccb4-e9c9-1225-256d-c287adf5494e@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: BUG #15114: logical decoding Segmentation fault  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Ответы Re: BUG #15114: logical decoding Segmentation fault  (Noah Misch <noah@leadboat.com>)
Re: BUG #15114: logical decoding Segmentation fault  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-bugs
I have another approach for this.

Recall that the issue is ultimately that RelationGetIndexAttrBitmap()
might need a snapshot under certain circumstances, and it will crash if
there isn't one.  There are actually two separate bugs, in the publisher
and in the subscriber.  Some patches have been proposed in this thread
that either bypass RelationGetIndexAttrBitmap() or obtain a snapshot at
different times in the publisher or subscriber code.

My approach is to make RelationGetIndexAttrBitmap() not need a snapshot.
 The whole code was overly complicated anyway, calling BuildIndexInfo()
and then throwing the result away.  We can do it directly more
efficiently and avoid all the business about eval_const_expressions().
Moreover, this fixes the problem in a central place and does not require
bespoke separate fixes in the publisher and subscriber code.  External
logical decoding or logical replication implementations could also be
affected and would benefit from this fix.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Suggestion: include interruption method for \watch option (page1922, PostgreSQL 11.1 Documentation)
Следующее
От: Noah Misch
Дата:
Сообщение: Re: BUG #15114: logical decoding Segmentation fault