pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Andres Freund <andres@anarazel.de>
Cc: Петър Славов <pet.slavov@gmail.com>
Cc: Petr Jelinek <petr@2ndquadrant.com>
Cc: pgsql-bugs@lists.postgresql.org, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Subject: Re: BUG #15114: logical decoding Segmentation fault
Date: Mon, 26 Mar 2018 13:08:01 -0300
Message-ID: <20180326160801.ja4j43hwrc35iuhb@alvherre.pgsql> (raw)
In-Reply-To: <20180326155237.i7qpurterx2iwg3c@alap3.anarazel.de>

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




view thread (30+ messages)  latest in thread

Message-ID: <20180326160801.ja4j43hwrc35iuhb@alvherre.pgsql>
Permalink:  ../20180326160801.ja4j43hwrc35iuhb@alvherre.pgsql/
Also on:    postgresql.org/message-id/20180326160801.ja4j43hwrc35iuhb@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: alvherre@alvh.no-ip.org, andres@anarazel.de, pet.slavov@gmail.com, petr@2ndquadrant.com, peter.eisentraut@2ndquadrant.com
  Subject: Re: BUG #15114: logical decoding Segmentation fault
  In-Reply-To: <20180326160801.ja4j43hwrc35iuhb@alvherre.pgsql>
  References: <20180326155237.i7qpurterx2iwg3c@alap3.anarazel.de> <20180326160801.ja4j43hwrc35iuhb@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox