Re: Internal error XX000 with enable_partition_pruning=on, pg 11 beta1 on Debian
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rushabh Lathia <rushabh.lathia@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>,
David Rowley <david.rowley@2ndquadrant.com>,
Robert Haas <robertmhaas@gmail.com>,
Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>,
Phil Florent <philflorent@hotmail.com>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2018-08-07T23:09:49Z
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 →
-
Match RelOptInfos by relids not pointer equality.
- a3deecb1c9af 11.0 landed
- 11e22e486d8d 12.0 landed
-
Fix run-time partition pruning for appends with multiple source rels.
- 1b54e91faabf 11.0 landed
- 1c2cb2744bf3 12.0 landed
Rushabh Lathia <rushabh.lathia@gmail.com> writes: > Consider the below case: I initially thought the rule might be messing stuff up, but you can get the same result without the rule by writing out the transformed query by hand: regression=# explain UPDATE pt_p1 SET a = 3 from pt WHERE pt.a = 2 and pt.a = pt_p1.a; ERROR: child rel 2 not found in append_rel_array With enable_partition_pruning=off this goes through without an error. I suspect the join pruning stuff is getting confused by the overlap between the two partitioning trees involved in the join; although the fact that one of them is the target rel must be related too, because if you just write a SELECT for this join it's fine. I rather doubt that this case worked before 1b54e91fa ... no time to look closer today, though. regards, tom lane