On Tue, Jan 28, 2020 at 6:11 PM Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> This structure looks good now.
Thanks for taking a look.
> However, it does seem unfortunate that in pg_get_publication_tables() we
> need to postprocess the result of GetPublicationRelations(). Since
> we're already changing the API of GetPublicationRelations(), couldn't we
> also make it optionally not include partitioned tables?
Hmm, okay. We really need GetPublicationRelations() to handle
partitioned tables in 3 ways:
1. Don't expand and return them as-is
2. Expand and return only leaf partitions
3. Expand and return all partitions
I will try that in the new patch.
> For the test, perhaps add test cases where partitions are attached and
> detached so that we can see whether their publication relcache
> information is properly updated. (I'm not doubting that it works, but
> it would be good to have a test for, in case of future restructuring.)
Okay, I will add some to publication.sql.
Will send updated patches after addressing Rafia's comments.
Thanks,
Amit