v1_amit_1.patch.txt

text/plain

Filename: v1_amit_1.patch.txt
Type: text/plain
Part: 0
Message: Re: Logical Replication of sequences
diff --git a/src/backend/catalog/pg_publication.c b/src/backend/catalog/pg_publication.c
index b306455aaad..2e78676e793 100644
--- a/src/backend/catalog/pg_publication.c
+++ b/src/backend/catalog/pg_publication.c
@@ -115,8 +115,10 @@ check_publication_add_schema(Oid schemaid)
  * Returns if relation represented by oid and Form_pg_class entry
  * is publishable.
  *
- * Does same checks as check_publication_add_relation() above, but does not
- * need relation to be opened and also does not throw errors.
+ * Does same checks as check_publication_add_relation() above except for
+ * RELKIND_SEQUENCE, but does not need relation to be opened and also does
+ * not throw errors. Here, the additional check is to support ALL SEQUENCES
+ * publication.
  *
  * XXX  This also excludes all tables with relid < FirstNormalObjectId,
  * ie all tables created during initdb.  This mainly affects the preinstalled
@@ -129,9 +131,6 @@ check_publication_add_schema(Oid schemaid)
  * dropped and reloaded and then it'll be considered publishable.  The best
  * long-term solution may be to add a "relispublishable" bool to pg_class,
  * and depend on that instead of OID checks.
- *
- * XXX  This also allows sequences to be included, which is necessary
- * to retrieve the list of sequences for the ALL SEQUENCES publication.
  */
 static bool
 is_publishable_class(Oid relid, Form_pg_class reltuple)