pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Dmytro Astapov <dastapov@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Surprising SeqScan of appendRel that can't contribute any rows to the result
Date: Tue, 17 Dec 2024 20:40:21 -0500
Message-ID: <2549068.1734486021@sss.pgh.pa.us> (raw)
In-Reply-To: <CAApHDvp5Rj9KwbyOMBWHghJjmX9=cZkhFHSd8U1e5BLP-LeYEQ@mail.gmail.com>
References: <CAFQUnFh662SNr8pmJt2BDimTwXvMnv-cRBAECAHP5sG7U+6rLw@mail.gmail.com>
	<CAApHDvp5Rj9KwbyOMBWHghJjmX9=cZkhFHSd8U1e5BLP-LeYEQ@mail.gmail.com>

David Rowley <dgrowleyml@gmail.com> writes:
> On Wed, 18 Dec 2024 at 12:17, Dmytro Astapov <dastapov@gmail.com> wrote:
>> Surprisingly, this does SeqScan on partB in NestedLoops over some_ids with a filter `some_ids.id = NULL::bigint`:

> TL;DR is it's not a bug and expected behaviour.

The particular case shown here might be fixable by re-applying
eval_const_expressions after we've derived the pushed-down qual.
Most of the time that'd be a waste of cycles though, and I'm
not sure how often it would help.

			regards, tom lane





view thread (4+ messages)

Message-ID: <2549068.1734486021@sss.pgh.pa.us>
Permalink:  ../2549068.1734486021@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2549068.1734486021@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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dgrowleyml@gmail.com, dastapov@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: Surprising SeqScan of appendRel that can't contribute any rows to the result
  In-Reply-To: <2549068.1734486021@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