From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Ondřej Bouda <obouda@email.cz>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-hackers@lists.postgresql.org
Cc: pgsql-general@lists.postgresql.org
Subject: Re: backend crash on DELETE, reproducible locally
Date: Tue, 6 Nov 2018 23:11:29 +0100
Message-ID: <b331a23e-8e34-b2f2-3a2b-f1e1c770d3b6@2ndquadrant.com> (raw)
In-Reply-To: <20181106215457.h36ccb5wywatcqhz@alap3.anarazel.de>
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>
<fc1fde8f-2e1d-3f8d-a583-82ba383c7fd2@email.cz>
<4375.1541540840@sss.pgh.pa.us>
<20181106215457.h36ccb5wywatcqhz@alap3.anarazel.de>
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?= <obouda@email.cz> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-general@postgresql.org
Cc: tomas.vondra@2ndquadrant.com, andres@anarazel.de, tgl@sss.pgh.pa.us, obouda@email.cz, alvherre@2ndquadrant.com, pgsql-hackers@lists.postgresql.org, pgsql-general@lists.postgresql.org
Subject: Re: backend crash on DELETE, reproducible locally
In-Reply-To: <b331a23e-8e34-b2f2-3a2b-f1e1c770d3b6@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox