Re: BUG #15114: logical decoding Segmentation fault

Поиск
Список
Период
Сортировка
От Petr Jelinek
Тема Re: BUG #15114: logical decoding Segmentation fault
Дата
Msg-id 11af0d1b-e48f-fba3-5b1e-49886f648f52@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: BUG #15114: logical decoding Segmentation fault  (Петър Славов <pet.slavov@gmail.com>)
Ответы Re: BUG #15114: logical decoding Segmentation fault  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-bugs
Hi,

This thread was brought to my attention during pgconf.eu (as I sadly
missed it).

On 04/10/2018 10:03, Петър Славов wrote:
> Hi,
> What happen here - I cannot see fix for this bug.
> I also cannot see the workaround parch in the code.
> Do I have to do something to mo e this fix forward?
> 
> I think we agreed that this bug braked logical decoding or I am wrong ?
>

Yes it's definitely a bug.

Also please note that we bottom-post in PostgreSQL mailing lists.

> 
> На пт, 27.04.2018 г. в 3:22 ч. Michael Paquier <michael@paquier.xyz
> <mailto:michael@paquier.xyz>> написа:
> 
>     On Fri, Apr 27, 2018 at 12:26:52AM +0200, Петър Славов wrote:
>     > I tried to compile this and i had this error:
>     >
>     > proto.c: In function ‘logicalrep_write_attrs’:
>     > proto.c:565:17: error: ‘FormData_pg_index {aka struct
>     FormData_pg_index}’
>     > has no member named ‘indnkeyatts’
>     >     natts = index->indnkeyatts;
> 
>     The patch Alvaro has sent is made for the master branch, and you are
>     visibly using a build of REL_10_STABLE.  Ths conflict you are seeing
>     comes from 8224de4 which introduced Covering indexes, and renamed
>     indnatts to indnkeyatts in Form_pg_index.
>     --
>     Michael
> 

I wrote my own patch to solve this which is quite similar to Alvaro's
except that it does not do the manual work to build indexes list as we
already have RelationGetReplicaIndex which does all the necessary work
and also uses the same rd_idattr for cache that
RelationGetIndexAttrBitmap does, it's better for performance and looks
safe to me.

I attached both patch for PG11+ (ie master) and the backport patch for
PG10, they only differ in the line identified above as problematic.

-- 
  Petr Jelinek                  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services

Вложения

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

Предыдущее
От: Dmitry Molotkov
Дата:
Сообщение: Re: BUG #15446: Crash on ALTER TABLE
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #15114: logical decoding Segmentation fault