Hi Amit, Sorry for the late reply.
I assume these are comments for the v3-0001 & v3-0002 patches... > > Yes, those were comments for patches on master. > > The partition-key-update-1.spec test fails with the following error > message appearing in the diffs. > > > > step s1u3pc: UPDATE foo_range_parted SET a=11 WHERE a=7; > > +ERROR: cannot move row being updated to another partition > > ...whereas, this error happens with the patch I posted in my last > email (prevent-row-movement-on-pk-table.patch) that is not meant to be > considered for HEAD, but for back-branches (if at all). I also see > that cfbot got triggered by it and shows the same failure. I am not > going to try to take care of these failures unless we want to do > something in the back-branches. > > To be clear, patches for HEAD do pass make check-world. > > OK. > > I think the documentation update is missing from the patches. > > Hmm, I don't think we document the behavior that is improved by the v3 > patches as a limitation of any existing feature, neither of foreign > keys referencing partitioned tables nor of the update row movement > feature. So maybe there's nothing in the existing documentation that > is to be updated. > > However, the patch does add a new error message for a case that the > patch doesn't handle, so maybe we could document that as a limitation. > Not sure if in the Notes section of the UPDATE reference page which > has some notes on row movement or somewhere else. Do you have > suggestions? > > You are right, I could not find any direct explanation of the impact of row movement during UPDATE on a referencing table in the PostgreSQL docs. The two documents that come close are either: 1. https://www.postgresql.org/docs/13/trigger-definition.html . The para starting with "If an UPDATE on a partitioned table causes a row to move to another partition" However, this does not describe the behaviour of internal triggers which is the focus of this patch. 2. Another one like you mentioned, https://www.postgresql.org/docs/11/sql-update.html This has explanation for row movement behaviour for partitioned table but does not explain any impact of such behaviour on a referencing table. I think it is worth adding some explanation in this document. Thus, explaining impact on referencing tables here, as it already describes behaviour of UPDATE on a partitioned table. Thank you. Rahila Syed