We've reviewed patch v3 and found it right. Completely agree that in case we attach/detach partition relcaches for all child relations (if they exist) need invalidation.
Installcheck world succeeds after the patch. Tests from the patch fail as they should when run on the master branch. Found no problems.
Overall patch is good and I'd recommend it to be committed.
We've made v4 patch according to Nitin's advice and tested it, but still have no objections to patch v3. Each can be committed, equally good.
Big thanks to you, Álvaro and Amit for working on this!