Dean Rasheed <dean.a.rash...@gmail.com> writes: > Attached is a patch that prevents UNION ALL subquery pullup in MERGE only.
I think that this is a band-aid that's just masking an error in the rowmarking logic: it's not doing the right thing for appendrels made from UNION ALL subqueries. I've not wrapped my head around exactly where it's going off the rails, but I feel like this ought to get fixed somewhere else. Please hold off pushing your patch for now. (The test case looks valuable though, thanks for working on that.) regards, tom lane