On Fri, Mar 24, 2023 at 2:36 PM wangw.f...@fujitsu.com <wangw.f...@fujitsu.com> wrote: > > On Fri, Mar 24, 2023 at 14:17 PM Amit Kapila <amit.kapil...@gmail.com> wrote: > > And I found there is a problem in the three back-branch patches > (HEAD_v21_0002*, > REL15_* and REL14_*): > In the function fetch_table_list, we use pg_partition_ancestors to get the > list > of tables from the publisher. But the pg_partition_ancestors was introduced in > v12, which means that if the publisher is v11 and the subscriber is v14+, this > will cause an error. >
Yeah, I am also not sure how to fix this for back-branches. I didn't see any field report for this so I am hesitant to make any complicated changes in back-branches that will deviate it from HEAD. Let's try to fix it for HEAD at this stage. I have slightly modified the attached patch, the changes are (a) I have removed the retail pfrees added in pg_get_publication_tables() as that memory will anyway be freed when we call SRF_RETURN_DONE(). It is also inconsistent to sometimes do retail pfree and not other times in the same function. I have also referred few similar functions and didn't find them doing retail pfree. (b) Changed the comments in a few places. The patch looks good to me. So, I am planning to push this sometime early next week unless there are more suggestions or comments. -- With Regards, Amit Kapila.
v23-0001-Avoid-syncing-data-twice-for-the-publish_via_par.patch
Description: Binary data