Re: Index Skip Scan - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Index Skip Scan
Date
Msg-id CAH2-Wzm1YNybYKaDX=dR+Oq8TubhXqb+Q0mhOMEyVAg=k5P=Aw@mail.gmail.com
Whole thread Raw
In response to RE: Index Skip Scan  (Floris Van Nee <florisvannee@Optiver.com>)
List pgsql-hackers
On Wed, Jan 22, 2020 at 1:09 PM Floris Van Nee <florisvannee@optiver.com> wrote:
> The loose index scan shouldn't return a tuple twice. It should only be able to skip 'further', so that shouldn't be a
problem.Out of curiosity, why can't index scans return the same tuple twice? Is there something in the executor that
isn'table to handle this? 

I have no reason to believe that the executor has a problem with index
scans that return a tuple more than once, aside from the very obvious:
in general, that will often be wrong. It might not be wrong when the
scan happens to be input to a unique node anyway, or something like
that.

I'm not particularly concerned about it. Just wanted to be clear on
our assumptions for loose index scans -- if loose index scans were
allowed to return a tuple more than once, then that would at least
have to at least be considered in the wider context of the executor
(but apparently they're not, so no need to worry about it). This may
have been mentioned somewhere already. If it is then I must have
missed it.

--
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: Ought to use heap_multi_insert() for pg_attribute/dependinsertions?
Next
From: Malthe
Date:
Subject: Index-only scan for "f(x)" without "x"