pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Match RelOptInfos by relids not pointer equality.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Match RelOptInfos by relids not pointer equality.
@ 2018-08-08 15:44  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2018-08-08 15:44 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a3deecb1c9af1e3d210a321401e40f22db859290

Modified Files
--------------
src/backend/partitioning/partprune.c          |  2 +-
src/test/regress/expected/partition_prune.out | 79 +++++++++++++++++++++++++++
src/test/regress/sql/partition_prune.sql      |  6 ++
3 files changed, 86 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Match RelOptInfos by relids not pointer equality.
@ 2018-08-08 15:44  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2018-08-08 15:44 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/11e22e486d8da6cef4d954c6f2952097df276fa7

Modified Files
--------------
src/backend/partitioning/partprune.c          |  2 +-
src/test/regress/expected/partition_prune.out | 79 +++++++++++++++++++++++++++
src/test/regress/sql/partition_prune.sql      |  6 ++
3 files changed, 86 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2018-08-08 15:44 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08 15:44 pgsql: Match RelOptInfos by relids not pointer equality. Tom Lane <tgl@sss.pgh.pa.us>
2018-08-08 15:44 pgsql: Match RelOptInfos by relids not pointer equality. Tom Lane <tgl@sss.pgh.pa.us>

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