Join removal and attr_needed cleanup

From: Antonin Houska <ah(at)cybertec(dot)at>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Join removal and attr_needed cleanup
Date: 2024-04-29 10:34:03
Message-ID: 63490.1714386843@antos
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The attached patch tries to fix a corner case where attr_needed of an inner
relation of an OJ contains the join relid only because another,
already-removed OJ, needed some of its attributes. The unnecessary presence of
the join relid in attr_needed can prevent the planner from further join
removals.

Do cases like this seem worth the effort and is the logic I use correct?

--
Antonin Houska
Web: https://www.cybertec-postgresql.com

Attachment Content-Type Size
0001-Cleanup-attr_needed-properly-after-join-removal.patch text/x-diff 6.5 KB

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2024-04-29 10:58:17 Re: speed up a logical replica setup
Previous Message Amit Kapila 2024-04-29 09:56:48 Re: speed up a logical replica setup