Re: [PoC] Reducing planning time when tables have many partitions
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Amit Langote <amitlangote09@gmail.com>,
Yuya Watari <watari.yuya@gmail.com>,
Alvaro Herrera <alvherre@alvh.no-ip.org>,
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>,
Dmitry Dolgov <9erthalion6@gmail.com>,
PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>,
jian he <jian.universality@gmail.com>,
Alena Rybakina <lena.ribackina@yandex.ru>,
Andrei Lepikhov <a.lepikhov@postgrespro.ru>,
Thom Brown <thom@linux.com>, Zhang Mingli <zmlpostgres@gmail.com>
Date: 2025-04-04T15:05:05Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Update wording in optimizer/README for EquivalenceClasses
- d7c04db27aeb 18.0 landed
-
Speedup child EquivalenceMember lookup in planner
- d69d45a5a956 18.0 landed
-
Allow planner to use Merge Append to efficiently implement UNION
- 66c0185a3d14 17.0 cited
-
Remove trailing zero words from Bitmapsets
- a8c09daa8bb1 17.0 cited
-
Make Vars be outer-join-aware.
- 2489d76c4906 16.0 cited
-
Avoid making commutatively-duplicate clauses in EquivalenceClasses.
- a5fc46414deb 16.0 cited
Attachments
- v39-Speed-up-searches-for-child-EquivalenceMembers.patch (text/x-diff) patch v39
David Rowley <dgrowleyml@gmail.com> writes: > I've attached the updated set of patches. This patchset has a distinct whiff of unseemly haste. 1. The commit message for 0002 still claims that child EC members are kept in RelOptInfos, precisely the point I objected to upthread. I see that in fact that's untrue, but it'd be nice if the commit log had some connection to what's being committed. 2. Because there is no longer any need to find RelOptInfos, the EquivalenceMemberIterator stuff doesn't need a "root" pointer, either in the struct or as an setup_eclass_member_iterator argument. 3. Because of #2, the 0001 patch is useless code churn and should be dropped. See attached (just a hasty root-ectomy, I've not really read much else). I do note that add_child_eq_member seems to have a considerable amount of faith that root->simple_rel_array_size can't increase after we start adding child members. That seems rather unsafe, though the fact that it hasn't crashed in light testing suggests that maybe there's something I'm missing. I would be much happier if there were provision to expand the array at need. regards, tom lane