Re: BUG #15114: logical decoding Segmentation fault

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Петър Славов <pet(dot)slavov(at)gmail(dot)com>, 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-03-26 16:08:01
Message-ID: 20180326160801.ja4j43hwrc35iuhb@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Andres Freund wrote:

> Alvaro, Petr: If I understand correctly what happens here is that some
> *other* column than the replica identity has a predicate with a full
> blown SQL function. We shouldn't evaluate arbitrary code like that
> inside the otuput plugin!
>
> So RelationGetIndexAttrBitmap() builds a bitmap of *all* indexed
> columns. Besides the code exec problem above, this is also just
> inefficient. I think this needs to be replaced by some replident
> bespoke code?

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.

This is neither my area nor my code, but if Petr and Peter decline
producing a patch for this quickly, I can look at it in a few days.

--
Á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 Andres Freund 2018-03-26 16:19:26 Re: BUG #15114: logical decoding Segmentation fault
Previous Message Andres Freund 2018-03-26 15:52:37 Re: BUG #15114: logical decoding Segmentation fault