On Sat, Jan 18, 2025 at 10:31 AM vignesh C <vignes...@gmail.com> wrote:
>
> Attached patch has the fix for this issue which includes the partition
> tables also for the publication now and throws a warning
> appropriately.
>

The corresponding query (see "To find which tables might potentially
include non-local origins .." on [1]) on the create_subscription doc
page.

*
@@ -1147,10 +1151,12 @@ pg_get_publication_tables(PG_FUNCTION_ARGS)
     *schemarelids;

  relids = GetPublicationRelations(pub_elem->oid,
+ allparttables ? PUBLICATION_PART_ALL :
  pub_elem->pubviaroot ?
  PUBLICATION_PART_ROOT :
  PUBLICATION_PART_LEAF);
  schemarelids = GetAllSchemaPublicationRelations(pub_elem->oid,
+ allparttables ? PUBLICATION_PART_ALL :
  pub_elem->pubviaroot ?
  PUBLICATION_PART_ROOT :
  PUBLICATION_PART_LEAF);

Don't we need to add similar handling FOR ALL TABLES case? If not, why?

BTW, the proposed fix is not backpatcheable as it changes the catalog
which requires catversion bump. However, as this is a WARNING case, if
we can't find a fix that can't be backpatched, we can fix it in
HEAD-only.

[1] - 
https://www.postgresql.org/docs/devel/sql-createsubscription.html#SQL-CREATESUBSCRIPTION-NOTES

-- 
With Regards,
Amit Kapila.


Reply via email to