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 1gK8fn-00075W-D5 for pgsql-general@arkaria.postgresql.org; Tue, 06 Nov 2018 21:14:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gK8fl-0005aN-Sj for pgsql-general@arkaria.postgresql.org; Tue, 06 Nov 2018 21:14:05 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1gK8fl-0005Zp-Jl; Tue, 06 Nov 2018 21:14:05 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gK8fj-00016Z-Hz; Tue, 06 Nov 2018 21:14:05 +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 wA6LDwsv002878; Tue, 6 Nov 2018 16:13:58 -0500 From: Tom Lane To: Alvaro Herrera cc: =?UTF-8?Q?Ond=c5=99ej_Bouda?= , pgsql-hackers@lists.postgresql.org, pgsql-general@lists.postgresql.org Subject: Re: backend crash on DELETE, reproducible locally In-reply-to: <2432.1541538215@sss.pgh.pa.us> References: <20181106194553.dynhd2xuivo56ymd@alvherre.pgsql> <33d144b9-5208-8d32-7e95-94ed4d2931b8@email.cz> <450.1541535425@sss.pgh.pa.us> <134c09b5-3eb0-bafd-2aeb-f383e1e21b8a@email.cz> <2432.1541538215@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Tue, 06 Nov 2018 16:03:35 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <2876.1541538838.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Tue, 06 Nov 2018 16:13:58 -0500 Message-ID: <2877.1541538838@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > Interestingly, it doesn't crash if I change the index type to btree, > which I was not expecting because the crashing code seems pretty > independent of the index type. Oh ... duh. The problem here is that ProjIndexIsUnchanged thinks that the type of the index column is identical to the type of the source datum for it, which is not true for any opclass making use of the opckeytype property. Ondřej, as a short-term workaround you could prevent the crash by setting that index's recheck_on_update property to false. regards, tom lane