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 1gK7jx-0004VG-G0 for pgsql-general@arkaria.postgresql.org; Tue, 06 Nov 2018 20:14:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gK7jv-0005qK-Cc for pgsql-general@arkaria.postgresql.org; Tue, 06 Nov 2018 20:14:19 +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 1gK7jv-0005pP-1B for pgsql-general@lists.postgresql.org; Tue, 06 Nov 2018 20:14:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gK7jr-0002bX-PK for pgsql-general@lists.postgresql.org; Tue, 06 Nov 2018 20:14:17 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id wA6KE8t3000334; Tue, 6 Nov 2018 15:14:08 -0500 From: Tom Lane To: Alvaro Herrera cc: =?utf-8?Q?Ond=C5=99ej?= Bouda , =?utf-8?Q?Ond=C5=99ej?= Bouda , pgsql-general@lists.postgresql.org Subject: Re: backend crash on DELETE, reproducible locally In-reply-to: <20181106194553.dynhd2xuivo56ymd@alvherre.pgsql> References: <20181106194553.dynhd2xuivo56ymd@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Tue, 06 Nov 2018 16:45:53 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <332.1541535248.1@sss.pgh.pa.us> Date: Tue, 06 Nov 2018 15:14:08 -0500 Message-ID: <333.1541535248@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > What indexes are there in this table? Indexes on expressions are > particularly suspect. I had not looked at the "projection index" code before, and now that I have, I am desperately unhappy with it. It's seriously buggy, badly underdocumented, unbelievably inefficient, and it looks like it creates a whole new set of reasons for unwanted recursion inside the relcache. The relcache has got NO business calling cost_qual_eval, for example. Having said that, I'm not real sure how it ends up with this crash. It looks like ProjIndexIsUnchanged is getting the wrong value for the index column's typbyval, but how could that be? regards, tom lane