Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gHl0C-0003KA-50 for pgsql-bugs@arkaria.postgresql.org; Wed, 31 Oct 2018 07:33:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gHl09-0008Uu-Bl for pgsql-bugs@arkaria.postgresql.org; Wed, 31 Oct 2018 07:33:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gHkwn-0005Vl-RM for pgsql-bugs@lists.postgresql.org; Wed, 31 Oct 2018 07:29:49 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gHkwj-0007zt-Tf for pgsql-bugs@lists.postgresql.org; Wed, 31 Oct 2018 07:29:48 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id B30B52226D; Wed, 31 Oct 2018 03:29:44 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 31 Oct 2018 03:29:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=fBjA5NJIEn+bU8EywRpseJoaZLC y+k0WKeQfzeE/lbQ=; b=M08AJL8eLroobcwR91oCJGauxkSr6GiycvUUHHYqr7w rlw9TBURy/o4thPRTsVQsbCFQTL0zqZFN5h/9KBFyrOx37ohtZrFDaKOkwZBys6z 3pCn+H9Ynv8xd1GQxJY94PFCcXN7ydJFhNU1Z3CHdCmwjsGs7pb8loQOLRc5eh9K o4ae0iBdJPHxw4tkDnO4VVbTZI/LFunU0K+NBAlfoH7GX9Y+IrBonAbHQCwDSA9u LOtNoSYI8T4O+NVPfkgA/yo/sRaqs5jb7Vch8RCpv3gv/w6vm21UndcPhYmt0oey ly2JPsZAom9KT/LU2M3My6mQhLe5+bu84cNVQnQD5+w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=fBjA5N JIEn+bU8EywRpseJoaZLCy+k0WKeQfzeE/lbQ=; b=k9qZisYGFZRFnrmRPWkHyI O9APEPTTgoTyoxDk/uqCHzA+/CNAtjrS+9a878+/cC1jehRpRVzFIsTqfZyAgBPG R/5R4orF2XRQEAPdEfXFburuF4i6XmANCQL6nmQkB2ZqHT3WMQKB6riaBw1K/a28 +CN2233WnqzhHTx20NWj45rAtfAIjfBFyFfTajGU/g1Agk5ufD39UB+8bZoTOAtf CZTEl3Hv49vp34RQOY9KhmR/R7de4/EOPWRfFEcCaPQ/QBSRDwC4JpCThO2fvFsj HZcqozZHr0wYocZowour6UYkTDR0EGkoJNTjdLyrYeObwYyeCM9OOLPJV1U2O3eA == X-ME-Sender: X-ME-Proxy: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id 9022710420; Wed, 31 Oct 2018 03:29:41 -0400 (EDT) Date: Wed, 31 Oct 2018 16:29:38 +0900 From: Michael Paquier To: Andres Freund Cc: Petr Jelinek , =?utf-8?B?0J/QtdGC0YrRgCDQodC70LDQstC+0LI=?= , Alvaro Herrera , Petr Jelinek , pgsql-bugs@lists.postgresql.org, Peter Eisentraut Subject: Re: BUG #15114: logical decoding Segmentation fault Message-ID: <20181031072938.GC7862@paquier.xyz> References: <20180427012203.GG3419@paquier.xyz> <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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="RYJh/3oyKhIjGcML" Content-Disposition: inline In-Reply-To: <20181030230931.22pms35u3sqx4i7c@alap3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --RYJh/3oyKhIjGcML Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --RYJh/3oyKhIjGcML Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlvZWeIACgkQnvQgOdby QH2kUg/9GvZRJUbuHdUASeTaFpG1O6dLSYbfCjXmBdL1XBHXlfOslAX4Fl1QCsoK sBUxdFaEDEjay8yx2a236WSAn96zLVfx7MiNhgVt0gHe1RhG7a7ZNq6PkLE9/9nw CILeLMkErg8GRME/bhwDpJ6s9itxbkpUfHofkr/bUf4eLGcoXKcSrgie8jnAEkE+ 5ZWSyyCEHNwqERU7yEGklrVO7o2M5pUjpgs821Kj7FVKXJSPdyL0/YYKpQb9Cw6O rs2OC4KHCG7aOO3XKfBevxlS+pwu5aVCZ7Zihsi286RVs3sVC07D7dUTDLcGL5Sm X+diI/WmWm7RGdBw7wMXpnL2uRjBhzdiGLRayONWVK3pj7o2rNBzksuV5K75Jl8e QSatbz4Q4NZlQ41+WirUM+ce/g5MVa1c2EDa+3fh5OJ82Zhlv46DwJdCmLcfkeKG WxiFPCcOIKL+IqDG2MAdihhvMfwuxhCqzR03VSkwi3Gc5JRe5lj6KBX6+PMbaUN/ gkorpC6mH6CINgnE4InzDsjgNfEQtWn5bRFo11NvRtWzCyZEsb8umSTHONxvubNt g7BDBuADXsFRqCjS1CY74WNZGY9qJZycrmacvpn4JYR2995ClFpY4aI3chEwNkAB KsTqFbOiDXy/ncxQqAD3fUd8k2k4jwOlc54x2W3OktBO07qcvjc= =DDOP -----END PGP SIGNATURE----- --RYJh/3oyKhIjGcML--