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 1gK9ZV-0001pk-HL for pgsql-general@arkaria.postgresql.org; Tue, 06 Nov 2018 22:11:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gK9ZS-0004OB-Mh for pgsql-general@arkaria.postgresql.org; Tue, 06 Nov 2018 22:11:38 +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 1gK9ZS-0004O0-Dx for pgsql-general@lists.postgresql.org; Tue, 06 Nov 2018 22:11:38 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gK9ZP-0002XO-Dx for pgsql-general@lists.postgresql.org; Tue, 06 Nov 2018 22:11:38 +0000 Received: by mail-wr1-x444.google.com with SMTP id z13-v6so12909382wrs.3 for ; Tue, 06 Nov 2018 14:11:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=kWyR9VtPnfyBuzQifgR92iX5WC1lLq4f7rbw51QdnW0=; b=WgXM2ZwGtjP1B148BlT324zc0DeuJ+Vy68EO0ojno7g6umuvQjDI88pH2pa+KcI4Pk cWhBadwfHmMHnhXRH/poibMijdoTAtnfpEKgVOcJnylhd/TicpZQgWi90izO4Emw8CX/ /5p2zCuzomETvvPFovSSOdNUGZ9gFSD7DBIY1ZJS/gFLWut+oTMaLjyctneKTxZ4WnDq UYpTkHpQ3J+oUbf8+hOEV5meSKNNNkwdeYcW0niRLxp2evFAl1ixDg7wkTOBybhgYCkH YD0H+8bVQ7bsRJGHHG8UcJ85zyMYn7uzpGrHVymmQvF8MlRsRf4mc05mEcK0OzsLJLeC YnRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kWyR9VtPnfyBuzQifgR92iX5WC1lLq4f7rbw51QdnW0=; b=oVMZJUMooBav/Yxe/IbZKBaaiVaSZeyR6wACPX2KXcMUeUaAC4S2cCmfD5v6yx9fV4 bi9FfMIzz5DSGYHrwwMjPRtlY4eEnQnCiPl6QRCs72QM24p2GVxKo+1GWqG793MckmbF DOTMoLjYe6nlSbKCC6k1wDi4PePuza41CjLbzuaPbeO7EHxyJg7F6Pz07tDr20df1OWl RhtMATNtS5oyRPVu/v+U29Y5ftfXPI+dqhYh9FD0yrl3SAC8gCgM/cfCpLXymM2A3uia LQ3pM3l3NfLDMzMpzfSxLm0JcYbqdfn7/bbBtaH6Lo90gJC8+VoeMkTmbXNsN6tond0C XdGA== X-Gm-Message-State: AGRZ1gLg9lMnLiyUh/wkyl8hPoJsRo1t0HVMQR2knDGqoJcIrLO/JjiJ 2ij3w+iqKVIQ8mD6fw6d3EbfxZh8g0u+5yL+4nX9Y/456gsLuTFK+uEiYT4Mo7J6gBaKmk/wzbV cT3ZlxxejCnZxsW3OSeIH8THqO82JjDSLak+K899EX+7eQA4U2QZQ+CIPjElQ76AyPexhRkTN+0 S5g4ONiZy7qt55z6sQTuY= X-Google-Smtp-Source: AJdET5d8FuXwjJdkGHLsankTp03fbW28CZ22cHmGExiOU59yhI6EqdfUbiliJYgN0my/yPpAPwzGOA== X-Received: by 2002:adf:fbc6:: with SMTP id d6-v6mr21831844wrs.241.1541542294328; Tue, 06 Nov 2018 14:11:34 -0800 (PST) Received: from [10.137.2.19] (ip-86-49-251-50.net.upcbroadband.cz. [86.49.251.50]) by smtp.gmail.com with ESMTPSA id l42-v6sm23218038wre.37.2018.11.06.14.11.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Nov 2018 14:11:33 -0800 (PST) Subject: Re: backend crash on DELETE, reproducible locally To: Andres Freund , Tom Lane Cc: =?UTF-8?Q?Ond=c5=99ej_Bouda?= , Alvaro Herrera , pgsql-hackers@lists.postgresql.org, pgsql-general@lists.postgresql.org 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> <2877.1541538838@sss.pgh.pa.us> <4375.1541540840@sss.pgh.pa.us> <20181106215457.h36ccb5wywatcqhz@alap3.anarazel.de> From: Tomas Vondra Message-ID: Date: Tue, 6 Nov 2018 23:11:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181106215457.h36ccb5wywatcqhz@alap3.anarazel.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 11/6/18 10:54 PM, Andres Freund wrote: > On 2018-11-06 16:47:20 -0500, Tom Lane wrote: >> =?UTF-8?Q?Ond=c5=99ej_Bouda?= writes: >>>> Ondřej, as a short-term workaround you could prevent the crash >>>> by setting that index's recheck_on_update property to false. >> >>> Thanks for the tip. I am unsuccessful using it, though: >>> # ALTER INDEX public.schedulecard_overlap_idx SET (recheck_on_update = >>> FALSE); >>> ERROR: unrecognized parameter "recheck_on_update" >> >> Oh, for crying out loud. That's yet a different bug. >> I'm not sure that it's the fault of the recheck_on_update >> feature proper though; it might be a pre-existing bug in >> the reloptions code. Looks like somebody forgot to list >> RELOPT_KIND_GIST in RELOPT_KIND_INDEX, but is that the >> fault of commit c203d6cf8 or was it busted before? > > Looks new: > + RELOPT_KIND_INDEX = RELOPT_KIND_BTREE|RELOPT_KIND_HASH|RELOPT_KIND_GIN|RELOPT_KIND_SPGIST, > > there aren't any other "for all indexes" type options, so the whole > category didn't exist before. > > It also strikes me as a really bad idea, even if RELOPT_KIND_GIST > wouldn't have been omitted: It breaks index am extensibility. > Does it? The RELOPT_KIND_* stuff is hard-coded in reloptions.h anyway, so I'm not sure how this particular thing makes it less extensible? That being said, we also have RELOPT_KIND_BRIN, and that seems to be missing from RELOPT_KIND_INDEX too (and AFAICS the optimization works for all index types). regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services