Re: Index only scan and ctid

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Index only scan and ctid
Date: 2020-02-04 18:11:59
Message-ID: 39d8715e58e0aaffc0295628270f6e0be6db68a2.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2020-02-03 at 14:43 -0500, Tom Lane wrote:
> Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> writes:
> > I noticed that "ctid" in the select list prevents an index only scan:
> > This strikes me as strange, since every index contains "ctid".
>
> There's no provision for an IOS to return a system column, though.
> Not sure what it'd take to make that possible.

I was reminded what the obvious problem is:
the ctid of a heap only tuple is not stored in the index. Duh.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-02-04 18:22:54 Re: Index only scan and ctid
Previous Message Tom Lane 2020-02-04 18:08:46 Re: BUG #16171: Potential malformed JSON in explain output