Dear Shlok-san, Thanks for updating the patch. Here are comments.
1. I feel the name of SnapBuildDistributeNewCatalogSnapshot() should be updated because it distributes two objects: catalog snapshot and invalidation messages. Do you have good one in your mind? I considered "SnapBuildDistributeNewCatalogSnapshotAndInValidations" or "SnapBuildDistributeItems" but seems not good :-(. 2. Hmm, still, it is overengineering for me to add a new type of invalidation message only for the publication. According to the ExecRenameStmt() we can implement an arbitrary rename function like RenameConstraint() and RenameDatabase(). Regaring the ALTER PUBLICATION OWNER TO, I feel adding CacheInvalidateRelcacheAll() and InvalidatePublicationRels() is enough. I attached a PoC which implements above. It could pass tests on my env. Could you please see it tell me how you think? Best regards, Hayato Kuroda FUJITSU LIMITED
add_invalidations.diffs
Description: add_invalidations.diffs