On 18/12/17 21:57, Joshua D. Drake wrote: > On 12/18/2017 12:52 PM, Andres Freund wrote: >> >> Just ot make sure: You're saying there's no problem here, and that >> logical rep is behaving correctly, right? > > Correct. I am not sure where the miscommunication was (fully willing to > accept it was on my side) but if I update multiple rows in a single > statement, all the rows that were modified get replicated. That is the > behavior I would have expected. >
I think it's because we said if you update single row on upstream which may be confusing in case of multiple rows. It will update single row on downstream even though there is 4 same rows on downstream. That's still true. In your test however you have 4 same rows on downstream but you also have same 4 rows on upstream which you all updated. So you got 4 row updates which were replicated and each of those 4 updates changed one row. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services