pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Andres Freund <andres@anarazel.de>
Cc: Manuel Rigger <rigger.manuel@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: ERROR: found unexpected null value in index
Date: Thu, 11 Jul 2019 19:01:14 -0400
Message-ID: <23597.1562886074@sss.pgh.pa.us> (raw)
In-Reply-To: <CAH2-Wz=iKggOMg6QU5m5cgJD=sh+iUnQZpQ-171brz0M44DvMA@mail.gmail.com>
References: <CA+u7OA7W4NWEhCvftdV6_8bbm2vgypi5nuxfnSEJQqVKFSUoMg@mail.gmail.com>
	<9288.1562720919@sss.pgh.pa.us>
	<CAH2-Wzm41rs0Ee=zi-qWQVpgZoZkY4aq8_ZBFCUK+BGJrOo47g@mail.gmail.com>
	<20825.1562723034@sss.pgh.pa.us>
	<CAH2-Wz=+N+QZ=+ACv3PQ8LqXmsMbfuMviGTYg7X5rwE6xT2L=Q@mail.gmail.com>
	<8251.1562726821@sss.pgh.pa.us>
	<CAH2-WzkNv-HyAGvkkq4ymv1fJTr+jrLCQqiXaopXSE3DUo_ncA@mail.gmail.com>
	<12489.1562788970@sss.pgh.pa.us>
	<20190710201547.l6vs6y3cf2tuac73@alap3.anarazel.de>
	<13550.1562790349@sss.pgh.pa.us>
	<CAH2-Wz=FZhBWWMC=cYZuyinf7VJ9kTBs=bupcfDV=N8gCwhjuQ@mail.gmail.com>
	<18788.1562797589@sss.pgh.pa.us>
	<CAH2-Wz=MAO7L_YEQhOg2yK41L2-Zk9=MCe6QJkkGRwhfihLkRg@mail.gmail.com>
	<21234.1562801346@sss.pgh.pa.us>
	<19241.1562880007@sss.pgh.pa.us>
	<CAH2-Wz=iKggOMg6QU5m5cgJD=sh+iUnQZpQ-171brz0M44DvMA@mail.gmail.com>

Peter Geoghegan <pg@bowt.ie> writes:
> On Thu, Jul 11, 2019 at 2:20 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> As far as I can tell, no special finagling is needed: if we just use
>> the regular index-only-scan logic then this all works the way we want,
>> and it's actually better than before because we get to skip heap visits
>> altogether when dealing with unchanging data.  Attached is a patch
>> against HEAD that seems to do all the right things.

> Interesting approach. I certainly prefer it to the alternative
> approach of framing the problem as a visibility concern.

Yes, I certainly like this better than my previous attempt.

I still feel like we're going to want to push (most of?) this logic
below the tableam API at some point, because its implementation was
and remains tied to heap+btree.  But other table AMs are likely to
support ordered scan accesses of some sort, and they're going to
want to be able to adjust the planner's extremal-value estimates
too.  It's a job for later though.

			regards, tom lane





view thread (23+ messages)  latest in thread

Message-ID: <23597.1562886074@sss.pgh.pa.us>
Permalink:  ../23597.1562886074@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23597.1562886074@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pg@bowt.ie, andres@anarazel.de, rigger.manuel@gmail.com
  Subject: Re: ERROR: found unexpected null value in index
  In-Reply-To: <23597.1562886074@sss.pgh.pa.us>
  References: <CA+u7OA7W4NWEhCvftdV6_8bbm2vgypi5nuxfnSEJQqVKFSUoMg@mail.gmail.com> <9288.1562720919@sss.pgh.pa.us> <CAH2-Wzm41rs0Ee=zi-qWQVpgZoZkY4aq8_ZBFCUK+BGJrOo47g@mail.gmail.com> <20825.1562723034@sss.pgh.pa.us> <CAH2-Wz=+N+QZ=+ACv3PQ8LqXmsMbfuMviGTYg7X5rwE6xT2L=Q@mail.gmail.com> <8251.1562726821@sss.pgh.pa.us> <CAH2-WzkNv-HyAGvkkq4ymv1fJTr+jrLCQqiXaopXSE3DUo_ncA@mail.gmail.com> <12489.1562788970@sss.pgh.pa.us> <20190710201547.l6vs6y3cf2tuac73@alap3.anarazel.de> <13550.1562790349@sss.pgh.pa.us> <CAH2-Wz=FZhBWWMC=cYZuyinf7VJ9kTBs=bupcfDV=N8gCwhjuQ@mail.gmail.com> <18788.1562797589@sss.pgh.pa.us> <CAH2-Wz=MAO7L_YEQhOg2yK41L2-Zk9=MCe6QJkkGRwhfihLkRg@mail.gmail.com> <21234.1562801346@sss.pgh.pa.us> <19241.1562880007@sss.pgh.pa.us> <CAH2-Wz=iKggOMg6QU5m5cgJD=sh+iUnQZpQ-171brz0M44DvMA@mail.gmail.com> <23597.1562886074@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