Re: BUG #15114: logical decoding Segmentation fault

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BUG #15114: logical decoding Segmentation fault
Дата
Msg-id 20180416175901.mdevawuuhvwo3yk6@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: BUG #15114: logical decoding Segmentation fault  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: BUG #15114: logical decoding Segmentation fault  (Петър Славов <pet.slavov@gmail.com>)
Список pgsql-bugs
Alvaro Herrera wrote:

> I agree -- I think logicalrep_write_attrs() should not use
> RelationGetIndexAttrBitmap at all but instead use some lower-level way
> to obtain columns of the replica identity.  I don't know whether there
> are historical-snapshot-related considerations to care about, in this
> code, though.

Here's a patch.  There is a disadvantage: one additional syscache lookup
each time logicalrep_write_attrs() is called.  I think that's all right,
since that's done once for each relation being replicated (not, say,
once per tuple or once per transaction).  Even so, I tried to move this
code as a special "quick-path" case in RelationGetIndexAttrBitmap, so
that it could be cached separately without processing the other indexes.
That turned out a bit too messy for my taste.


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

Вложения

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #15144: *** glibc detected *** postgres: postgres smsconsole[local] SELECT: double free or corruption (!pre
Следующее
От: Emre Hasegeli
Дата:
Сообщение: Re: Wrong Results from SP-GiST with Collations