Match RelOptInfos by relids not pointer equality.
Tom Lane <tgl@sss.pgh.pa.us>
Match RelOptInfos by relids not pointer equality. Commit 1c2cb2744 added some code that tried to detect whether two RelOptInfos were the "same" rel by pointer comparison; but it turns out that inheritance_planner breaks that, through its shenanigans with copying some relations forward into new subproblems. Compare relid sets instead. Add a regression test case to exercise this area. Problem reported by Rushabh Lathia; diagnosis and fix by Amit Langote, modified a bit by me. Discussion: https://postgr.es/m/CAGPqQf3anJGj65bqAQ9edDr8gF7qig6_avRgwMT9MsZ19COUPw@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/partitioning/partprune.c | modified | +1 −1 |
| src/test/regress/expected/partition_prune.out | modified | +79 −0 |
| src/test/regress/sql/partition_prune.sql | modified | +6 −0 |
Discussion
- Internal error XX000 with enable_partition_pruning=on, pg 11 beta1 on Debian 48 messages · 2018-06-08 → 2018-11-03