Re: BUG #15114: logical decoding Segmentation fault

From: Петър Славов <pet(dot)slavov(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Subject: Re: BUG #15114: logical decoding Segmentation fault
Date: 2018-04-26 22:26:52
Message-ID: CAC5T6EBGj6AfapRYORj8_hJR7A36uePdr3Ds5n4yy6=ktcQCyg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

I tried to compile this and i had this error:

gcc -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute
-Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard
-O2 -I. -I../../../../src/include -D_GNU_SOURCE -c -o proto.o proto.c
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;
^
<builtin>: recipe for target 'proto.o' failed
make[4]: *** [proto.o] Error 1
make[4]: Leaving directory
'/usr/src/postgresql-10.3/src/backend/replication/logical'
../../../src/backend/common.mk:41: recipe for target 'logical-recursive'
failed
make[3]: *** [logical-recursive] Error 2
make[3]: Leaving directory
'/usr/src/postgresql-10.3/src/backend/replication'
common.mk:41: recipe for target 'replication-recursive' failed
make[2]: *** [replication-recursive] Error 2
make[2]: Leaving directory '/usr/src/postgresql-10.3/src/backend'
Makefile:38: recipe for target 'all-backend-recurse' failed
make[1]: *** [all-backend-recurse] Error 2
make[1]: Leaving directory '/usr/src/postgresql-10.3/src'
GNUmakefile:11: recipe for target 'all-src-recurse' failed
make: *** [all-src-recurse] Error 2

-----
maybe - index->indnatts; ??

Peter Slavov

2018-04-16 19:59 GMT+02:00 Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>:

> 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
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2018-04-27 00:49:08 Re: Standby corruption after master is restarted
Previous Message Bruce Momjian 2018-04-26 18:57:23 Re: Fwd: [BUGS] pg_trgm word_similarity inconsistencies or bug