From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Zhihong Yu <zyu(at)yugabyte(dot)com>, Andreas Seltenreich <seltenreich(at)gmx(dot)de>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: [sqlsmith] Failed assertion during partition pruning |
Date: | 2021-02-01 06:20:28 |
Message-ID: | CAApHDvrXM7xdgFy9NvqfA+xhtDeHyxGY-c5x5fC1zc270Mbj1Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, 1 Feb 2021 at 18:57, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> I wrote:
> > David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> >> Parent RT indexes are guaranteed to be lower than their children RT
> >> indexes,
>
> > I was intentionally avoiding that assumption ;-). Maybe it buys enough
> > to be worth the loss of generality, but ...
>
> Oh, it's too late at night. I now remember that the real problem
> I had with that representation was that it cannot work for joinrels.
> Currently we only apply this logic to partitioned baserels, but
> don't you think it might someday be called on to optimize
> partitionwise joins?
I've not looked in detail, but I think the code would need a pretty
big overhaul before that could happen. For example, ever since we
allowed ATTACH PARTITION to work without taking an AEL we now have a
PartitionedRelPruneInfo.relid_map field that stores Oids for the
executor to look at to see if it can figure out if a partition has
been added since the plan was generated. Not sure how that can work
with non-base rels as we have no Oid for join rels. Perhaps I'm just
not thinking hard enough, but either way, it does seem like it would
take a pretty big hit with a hammer to make it work. My current
thinking is that being unable to represent join rels in a set of
Relids is fairly insignificant compared to what would be required to
get the feature to work correctly.
David
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro Horiguchi | 2021-02-01 06:29:21 | Re: Is Recovery actually paused? |
Previous Message | Amit Kapila | 2021-02-01 06:19:24 | Re: Single transaction in the tablesync worker? |