Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goOJI-0006a5-Fz for pgsql-bugs@arkaria.postgresql.org; Tue, 29 Jan 2019 07:59:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1goOJH-0004Kb-51 for pgsql-bugs@arkaria.postgresql.org; Tue, 29 Jan 2019 07:59:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goOJF-0004KU-DP for pgsql-bugs@lists.postgresql.org; Tue, 29 Jan 2019 07:59:54 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goOJB-0004MD-Up for pgsql-bugs@lists.postgresql.org; Tue, 29 Jan 2019 07:59:53 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 132F92313E; Tue, 29 Jan 2019 02:59:48 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 29 Jan 2019 02:59:48 -0500 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=pLnlSGlowXzmpxxR6Z9GACnuy36 0uwHG817aoQf5oQs=; b=ghTRhW1EzUafnS33Js0jq7b+pfO6tn8+kgxR6EmJJYC KtzA4faXYSItb2mPWJmpzhx33wjXHsi3KO53jBchxdbMyuz9STyBmBzKve7DEVR1 A4HO/UN1u6dduX4lV7zpEE+Jm2oEXMP7kjbdpMnH75dDcsYmuSLrQD/gcHtSf2El 53W/UyMrsXu6CDOjAG/AKl8vn8WDOpUGs3bs0CCwk7rr8MwKZJuWdvjnm5u6LMvD nyR5KH3QHUtXcxWRm4GHDrPtJHCRRGbgMonTBpC8uEUIPZQMgO0BCn35Y6/EHghp EY5NV3sx6S7J1cwdqTnxrFUYiYjSsFy3azsImvDZlmg== 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=pLnlSG lowXzmpxxR6Z9GACnuy360uwHG817aoQf5oQs=; b=gRCIRfpZ9HXdrq8VaU6fmf qZkPjuUjPVD1eD6+lLw1le+NfDBGQ/RDmBDwlIjkggX1CVnYdNCVygqOSI6krVtK qtWyj0eqByuIwY2HE8/QrmgLZRQzN6J0ljfiqs45GVqq4LVKNjwx2OBzkvG6CDDB X15WNiUaCMjcH/sLSYGs35HmbfrmodxPJsxcMylxrO0/X84A5Us9c2vo2dxJ5wbN csoKz7gjf/CAzc0cuinwuQeor7QKimQ4fL/KNeY9Aw+s7gmxMBrR3wpCB4m47VNR YnM7EuhSrgm2+wlcxRmMj02YpxlBQ9GF+VaHHsL/vDK1C8i55B4ntXs0vWOkfwuA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrjedugdduudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdejtd dmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgt hhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqne cukfhppeeiuddrvdduhedrudefjedrudeivdenucfrrghrrghmpehmrghilhhfrhhomhep mhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id E3B7EE41F3; Tue, 29 Jan 2019 02:59:43 -0500 (EST) Date: Tue, 29 Jan 2019 16:59:41 +0900 From: Michael Paquier To: Peter Eisentraut Cc: Kyotaro HORIGUCHI , andres@anarazel.de, petr.jelinek@2ndquadrant.com, pet.slavov@gmail.com, alvherre@alvh.no-ip.org, petr@2ndquadrant.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15114: logical decoding Segmentation fault Message-ID: <20190129075941.GH3121@paquier.xyz> References: <20181030230736.GA1632@paquier.xyz> <20181030230931.22pms35u3sqx4i7c@alap3.anarazel.de> <20181031072938.GC7862@paquier.xyz> <20181119.184916.179764314.horiguchi.kyotaro@lab.ntt.co.jp> <56d0ccb4-e9c9-1225-256d-c287adf5494e@2ndquadrant.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xHbokkKX1kTiQeDC" Content-Disposition: inline In-Reply-To: <56d0ccb4-e9c9-1225-256d-c287adf5494e@2ndquadrant.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --xHbokkKX1kTiQeDC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jan 28, 2019 at 10:32:16PM +0100, Peter Eisentraut wrote: > My approach is to make RelationGetIndexAttrBitmap() not need a snapshot. > The whole code was overly complicated anyway, calling BuildIndexInfo() > and then throwing the result away. We can do it directly more > efficiently and avoid all the business about eval_const_expressions(). > Moreover, this fixes the problem in a central place and does not require > bespoke separate fixes in the publisher and subscriber code. External > logical decoding or logical replication implementations could also be > affected and would benefit from this fix. I have spent some time for the last couple of days looking at this patch, and that's a neat approach. + * those might run constants evaluation, which needs a snapshot, which "constants evaluation" sounds like weird English. "constant evaluation" or "evaluation of constants would be better"? Thanks for adding a test case as well, Peter. -- Michael --xHbokkKX1kTiQeDC Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlxQB+wACgkQnvQgOdby QH3muA//VmcAEZTFOZPRxAnS773+dFfyRYZr9HulCOgfmqjF6SL5un/Y+bu7dq2N uCBNKLveSpAr/jaWEcwQJX9/5dv2cuXv2GuvEPsPO2MujJkGEe1eLdeKmMH++zur Mbqd8xMEZOL8Feawf4zeNNGfiC6hBnrq1y7L74w35QLcUI+yc7ntrk5Nsmg0CtqL igDIOZFDq1nMIM6WBuJumXwAGY02Mk94txrerr8JTplj11fCzeVcdcp6XW6dK5Q5 Fx3FAJwvMZqkcTu4X43Mtb3CQ90rn2RG5whLVRWDH8a9WJQI8RGWUmIQGmeOJuxF c+8AzbHnG/SiqwrwrRz6CccoVwAnrmfCGjMsiT7eQhHhupOXAsa5jXe8GE9CfBIe wuVsabXSbFBzGVF3ouHx38Ag8ZwG6+yART98VdVUN8WE51/0lPnA5lLSUxx5Fo4b 41Fi/KWxStQ/GNCXVWJXQp9LvAZWZiywuBR/X6Nyu341P1LhVOXblNe+gWM3djmI vPduCIJFC5bEJx1uJAdV3ZPDk78cRL4uu6V1SOygiWRFJlhKRLpS6hgoMFT4IqVR 3PYKor6AuUEqEVBURhitKTzESEIYg1TBTsfYogIjyUHg+RlfmSR2wH3mMANFgCXv 9ZZDhyrv2tp6pfO8QuAY1aQnnbJk2xOc7yMA9922I7vlrdsSkYw= =JH0T -----END PGP SIGNATURE----- --xHbokkKX1kTiQeDC--