Hi, I was looking at commit b7ae03953690a1dee455ba3823cc8f71a72cbe1d . In `pg_get_publication_tables`, attnums is allocated with size `desc->natts`. However, since some columns may be dropped, this size may be larger than necessary. When `nattnums > 0` is false, there is no need to allocate the `attnums` array. In the current formation, `attnums` should be freed in this scenario.
Please take a look at the patch which moves the allocation to inside the `if (nattnums > 0)` block. Thanks
proper-sizing-of-attnums.patch
Description: Binary data