Re: backend crash on DELETE, reproducible locally

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Ondřej Bouda <obouda@email.cz>, pgsql-hackers@lists.postgresql.org, pgsql-general@lists.postgresql.org
Date: 2018-11-06T21:13:58Z
Lists: pgsql-hackers, pgsql-general
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


Commits

  1. Disable recheck_on_update optimization to avoid crashes.

  2. Allow HOT updates for some expression indexes