On Thu, Oct 21, 2021 at 2:56 PM Peter Smith <smithpb2...@gmail.com> wrote: > > I just wanted to bring to your attention an earlier thread [1] in > which I had already encountered/reported behaviour that is either > exactly the same or is closely related to what is being discussed in > this current thread. If it is different please take that into account > also. > > ------ > [1] > https://www.postgresql.org/message-id/CAHut%2BPvJMRB-ZyC80we2kiUFv4cVjmA6jxXpEMhm1rmz%3D1ryeA%40mail.gmail.com >
Thanks, I was able to reproduce that behavior, which is similar (but in that case the publish_via_partition_root flag is toggled with the partitioned table present in the publication, whereas in the case being discussed the presence of the partitioned table in the publication is toggled with publish_via_partition_root always true). What seems to happen internally when a partitioned table is published is that when publish_via_partition_root=true the subscriber to that publication is effectively subscribed to the parent partitioned table but not the child partitions. If publish_via_partition_root is changed to false and the subscriber refreshes, the partitioned table is unsubscribed and it subscribes to the partitions. This explains why data gets "re-copied" when this happens, because then it is subscribing to a "new" table and copy_data=true by default. Regards, Greg Nancarrow Fujitsu Australia