pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Andres Freund <andres@anarazel.de>
Cc: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Cc: Петър Славов <pet.slavov@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
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: Wed, 31 Oct 2018 16:29:38 +0900
Message-ID: <20181031072938.GC7862@paquier.xyz> (raw)
In-Reply-To: <20181030230931.22pms35u3sqx4i7c@alap3.anarazel.de>
References: <CAC5T6EBGj6AfapRYORj8_hJR7A36uePdr3Ds5n4yy6=ktcQCyg@mail.gmail.com>
	<20180427012203.GG3419@paquier.xyz>
	<CAC5T6ED-Ti3Ryw9oU-o0JpQ=S3UNZ7BoQJCGzqb=t5736qrPzQ@mail.gmail.com>
	<11af0d1b-e48f-fba3-5b1e-49886f648f52@2ndquadrant.com>
	<20181029015438.GC14242@paquier.xyz>
	<4cc78025-2bdd-082d-fe38-a35366ba8867@2ndquadrant.com>
	<20181030062828.GB23393@paquier.xyz>
	<19dfa54d-6c4a-744a-d78a-4845b8da8241@2ndquadrant.com>
	<20181030230736.GA1632@paquier.xyz>
	<20181030230931.22pms35u3sqx4i7c@alap3.anarazel.de>

On Tue, Oct 30, 2018 at 04:09:31PM -0700, Andres Freund wrote:
> Replication needs to maintain the other indexes, and for that it needs
> to evaluate predicates.  So I don't understand how you could say that
> it doesn't need to know about other indexes?

You are right, sorry for the noise.  The worker applies the changes so
it needs to know about all the indexes and its information.  So we need
to tackle three separate issues here then:
1) On the sender side, make sure that only the replica index information
is fetched.  I actually would prefer something like what Alvaro proposed
upthread, to not save the saved information into the cached Relation,
and potentially have RelationGetIndexAttrBitmap() overwrite it.
2) On the apply side, move the snapshot build a bit earlier so as the
index information can be built properly.
3) Make sure that RelationGetIndexAttrBitmap() never gets called if
there is no snapshot available.

1) and 2) are the actual bug fixes to back-patch.  3) is optionally
something for HEAD, which Petr proposed.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (30+ messages)  latest in thread

Message-ID: <20181031072938.GC7862@paquier.xyz>
Permalink:  ../20181031072938.GC7862@paquier.xyz/
Also on:    postgresql.org/message-id/20181031072938.GC7862@paquier.xyz

 · 

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: michael@paquier.xyz, andres@anarazel.de, petr.jelinek@2ndquadrant.com, pet.slavov@gmail.com, alvherre@alvh.no-ip.org, petr@2ndquadrant.com, peter.eisentraut@2ndquadrant.com
  Subject: Re: BUG #15114: logical decoding Segmentation fault
  In-Reply-To: <20181031072938.GC7862@paquier.xyz>
  References: <CAC5T6EBGj6AfapRYORj8_hJR7A36uePdr3Ds5n4yy6=ktcQCyg@mail.gmail.com> <20180427012203.GG3419@paquier.xyz> <CAC5T6ED-Ti3Ryw9oU-o0JpQ=S3UNZ7BoQJCGzqb=t5736qrPzQ@mail.gmail.com> <11af0d1b-e48f-fba3-5b1e-49886f648f52@2ndquadrant.com> <20181029015438.GC14242@paquier.xyz> <4cc78025-2bdd-082d-fe38-a35366ba8867@2ndquadrant.com> <20181030062828.GB23393@paquier.xyz> <19dfa54d-6c4a-744a-d78a-4845b8da8241@2ndquadrant.com> <20181030230736.GA1632@paquier.xyz> <20181030230931.22pms35u3sqx4i7c@alap3.anarazel.de> <20181031072938.GC7862@paquier.xyz>

* 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