pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: 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, 06 Nov 2018 16:03:35 -0500
Message-ID: <2432.1541538215@sss.pgh.pa.us> (raw)
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>

=?UTF-8?Q?Ond=c5=99ej_Bouda?= <obouda@email.cz> 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




view thread (38+ messages)  latest in thread

Message-ID: <2432.1541538215@sss.pgh.pa.us>
Permalink:  ../2432.1541538215@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2432.1541538215@sss.pgh.pa.us

 · 

reply

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: 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: <2432.1541538215@sss.pgh.pa.us>

* 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