Re: Index Skip Scan

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: sk(at)zsrv(dot)org
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>, a(dot)kuzmenkov(at)postgrespro(dot)ru, pg(at)bowt(dot)ie, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Bhushan Uparkar <bhushan(dot)uparkar(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
Subject: Re: Index Skip Scan
Date: 2018-11-14 16:48:47
Message-ID: CA+q6zcWQyiFOkH9JC_tNgRXXHvRSq+a9De8VAB3fJun6VJQQOw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

> On Mon, 12 Nov 2018 at 13:55, Dmitry Dolgov <9erthalion6(at)gmail(dot)com> wrote:
>
> > On Mon, 12 Nov 2018 at 13:29, Sergei Kornilov <sk(at)zsrv(dot)org> wrote:
> >
> > I found reproducible crash due assert failure: FailedAssertion("!(numCols > 0)", File: "pathnode.c", Line: 2795)
> > > create table tablename (i int primary key);
> > > select distinct i from tablename where i = 1;
> > Query is obviously strange, but this is bug.
>
> Wow, thanks a lot! I can reproduce it too, will fix it.

Yep, we had to check number of distinct columns too, here is the fixed patch
(with a bit more verbose commit message).

Attachment Content-Type Size
0001-Index-skip-scan-with-fallback-v3.patch application/octet-stream 34.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Dolgov 2018-11-14 17:01:48 Re: Add function to release an allocated SQLDA
Previous Message Tom Lane 2018-11-14 16:32:15 Re: [Bug Fix]ECPG: cancellation of significant digits on ECPG