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 1gK8Vn-0006fv-67 for pgsql-general@arkaria.postgresql.org; Tue, 06 Nov 2018 21:03:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gK8Vl-00061r-77 for pgsql-general@arkaria.postgresql.org; Tue, 06 Nov 2018 21:03:45 +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 1gK8Vk-00061g-VI; Tue, 06 Nov 2018 21:03:45 +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 1gK8Vi-0000qC-Fo; Tue, 06 Nov 2018 21:03:44 +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 wA6L3Zho002433; Tue, 6 Nov 2018 16:03:35 -0500 From: Tom Lane To: =?UTF-8?Q?Ond=c5=99ej_Bouda?= cc: Alvaro Herrera , pgsql-hackers@lists.postgresql.org, pgsql-general@lists.postgresql.org Subject: Re: backend crash on DELETE, reproducible locally In-reply-to: <134c09b5-3eb0-bafd-2aeb-f383e1e21b8a@email.cz> 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> Comments: In-reply-to =?UTF-8?Q?Ond=c5=99ej_Bouda?= message dated "Tue, 06 Nov 2018 21:36:08 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2431.1541538215.1@sss.pgh.pa.us> Date: Tue, 06 Nov 2018 16:03:35 -0500 Message-ID: <2432.1541538215@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =?UTF-8?Q?Ond=c5=99ej_Bouda?= writes: >>> Hm, what are the data types of those columns? > scheduletemplate_id bigint NOT NULL, > period_day smallint NOT NULL, > timerange timerange NOT NULL, OK, so here's a minimal reproducer: drop table schedulecard; create table schedulecard ( scheduletemplate_id bigint NOT NULL, period_day smallint NOT NULL ); CREATE INDEX schedulecard_overlap_idx ON schedulecard USING gist (scheduletemplate_id, (period_day::integer % 7)); insert into schedulecard values(12, 1); update schedulecard set period_day = period_day + 7; 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. Haven't traced further than that yet. regards, tom lane