Phil Sorber <p...@omniti.com> writes: > On Wed, Jan 25, 2012 at 5:13 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > I played around with removing the optimization, but there are other > pieces further down the line that are upset but having a ModifyTable > node in the execution tree.
Hm, yeah, obviously this scenario has never been tested :-(. I have applied a patch for it, and also done some work so that it will get tested by the buildfarm in future. Thanks for the report! > We changed our writable CTE queries to update/insert loops so this is > no longer a blocker for us. FWIW, that technique didn't really work anyway, as even with the patch I observe that you get a "duplicate unique key" failure if two such commands try to insert a new row concurrently. This is because neither UPDATE subquery will see an as-yet-uncommitted inserted row. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs