From: Amit Kapila Date: Fri, 31 Mar 2023 03:29:55 +0000 (+0530) Subject: Add XML ID attributes to create_publication.sgml. X-Git-Url: http://git.postgresql.org/gitweb/-?a=commitdiff_plain;h=ed94e8563e036f3b42519f1c3b5ae1361e2a59bf;p=postgresql-pgindent.git Add XML ID attributes to create_publication.sgml. This commit adds XML ID attributes to all varlistentries in create_publication.sgml. This allows us to include links to refer to publication options, making documents more readable. Author: Kuroda Hayato Reviewed-by: Peter Smith, Amit Kapila Discussion: https://postgr.es/m/TYAPR01MB58668219FEA4EC231486A433F58E9@TYAPR01MB5866.jpnprd01.prod.outlook.com --- diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml index 6358c5da05..10ada41d80 100644 --- a/doc/src/sgml/logical-replication.sgml +++ b/doc/src/sgml/logical-replication.sgml @@ -367,7 +367,8 @@ INSERT 0 3 Create publications for the tables. The publications pub2 - and pub3a disallow some publish + and pub3a disallow some + publish operations. The publication pub3b has a row filter (see ). @@ -801,11 +802,12 @@ ALTER SUBSCRIPTION If the publication contains a partitioned table, the publication parameter - publish_via_partition_root determines which row filter - is used. If publish_via_partition_root is true, - the root partitioned table's row filter is used. Otherwise, - if publish_via_partition_root is false - (default), each partition's row filter is used. + publish_via_partition_root + determines which row filter is used. If publish_via_partition_root + is true, the root partitioned table's + row filter is used. Otherwise, if publish_via_partition_root + is false (default), each partition's + row filter is used. @@ -829,8 +831,9 @@ ALTER SUBSCRIPTION Because initial data synchronization does not take into account the - publish parameter when copying existing table data, - some rows may be copied that would not be replicated using DML. Refer to + publish + parameter when copying existing table data, some rows may be copied that + would not be replicated using DML. Refer to , and see for examples. @@ -851,7 +854,8 @@ ALTER SUBSCRIPTION If the subscription has several publications in which the same table has - been published with different row filters (for the same publish + been published with different row filters (for the same + publish operation), those expressions get ORed together, so that rows satisfying any of the expressions will be replicated. This means all the other row filters for the same table become redundant if: @@ -863,15 +867,17 @@ ALTER SUBSCRIPTION - One of the publications was created using FOR ALL TABLES. + One of the publications was created using + FOR ALL TABLES. This clause does not allow row filters. One of the publications was created using - FOR TABLES IN SCHEMA and the table belongs to - the referred schema. This clause does not allow row filters. + FOR TABLES IN SCHEMA + and the table belongs to the referred schema. This clause does not allow + row filters. @@ -1136,9 +1142,9 @@ test_sub=# SELECT * FROM t1; The following examples show how the publication parameter - publish_via_partition_root determines whether the row - filter of the parent or child table will be used in the case of partitioned - tables. + publish_via_partition_root + determines whether the row filter of the parent or child table will be used + in the case of partitioned tables. @@ -1291,15 +1297,16 @@ test_sub=# SELECT * FROM child ORDER BY a; Specifying a column list when the publication also publishes - FOR TABLES IN SCHEMA is not supported. + FOR TABLES IN SCHEMA + is not supported. For partitioned tables, the publication parameter - publish_via_partition_root determines which column list - is used. If publish_via_partition_root is - true, the root partitioned table's column list is used. - Otherwise, if publish_via_partition_root is + publish_via_partition_root + determines which column list is used. If publish_via_partition_root + is true, the root partitioned table's column list is + used. Otherwise, if publish_via_partition_root is false (the default), each partition's column list is used. @@ -1610,7 +1617,9 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER tables.) Publications can also specify that changes are to be replicated using the identity and schema of the partitioned root table instead of that of the individual leaf partitions in which the changes actually - originate (see CREATE PUBLICATION). + originate (see + publish_via_partition_root + parameter of CREATE PUBLICATION). @@ -1676,9 +1685,11 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER - The publication publish parameter only affects what - DML operations will be replicated. The initial data synchronization does - not take this parameter into account when copying the existing table data. + The publication + publish + parameter only affects what DML operations will be replicated. The + initial data synchronization does not take this parameter into account + when copying the existing table data. @@ -1724,10 +1735,11 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER and TRIGGER privilege on such tables to trusted roles. Moreover, if untrusted users can create tables, use only publications that list tables explicitly. That is to say, create a - subscription FOR ALL TABLES or - FOR TABLES IN SCHEMA only when superusers trust - every user permitted to create a non-temp table on the publisher or the - subscriber. + subscription + FOR ALL TABLES + or FOR TABLES IN SCHEMA + only when superusers trust every user permitted to create a non-temp table + on the publisher or the subscriber. diff --git a/doc/src/sgml/ref/alter_publication.sgml b/doc/src/sgml/ref/alter_publication.sgml index cd20868bca..c8424bca15 100644 --- a/doc/src/sgml/ref/alter_publication.sgml +++ b/doc/src/sgml/ref/alter_publication.sgml @@ -54,7 +54,8 @@ ALTER PUBLICATION name RENAME TO ALTER SUBSCRIPTION ... REFRESH PUBLICATION action on the subscribing side in order to become effective. Note also that DROP TABLES IN SCHEMA will not drop any schema tables - that were specified using FOR TABLE/ + that were specified using + FOR TABLE/ ADD TABLE, and the combination of DROP with a WHERE clause is not allowed. @@ -79,8 +80,9 @@ ALTER PUBLICATION name RENAME TO SET ROLE to the new owning role, and that role must have CREATE privilege on the database. - Also, the new owner of a FOR ALL TABLES or - FOR TABLES IN SCHEMA + Also, the new owner of a + FOR ALL TABLES + or FOR TABLES IN SCHEMA publication must be a superuser. However, a superuser can change the ownership of a publication regardless of these restrictions. diff --git a/doc/src/sgml/ref/create_publication.sgml b/doc/src/sgml/ref/create_publication.sgml index b2540c63ff..e3e1d04e73 100644 --- a/doc/src/sgml/ref/create_publication.sgml +++ b/doc/src/sgml/ref/create_publication.sgml @@ -54,7 +54,7 @@ CREATE PUBLICATION name Parameters - + name @@ -63,7 +63,7 @@ CREATE PUBLICATION name - + FOR TABLE @@ -117,7 +117,7 @@ CREATE PUBLICATION name - + FOR ALL TABLES @@ -127,7 +127,7 @@ CREATE PUBLICATION name - + FOR TABLES IN SCHEMA @@ -158,7 +158,7 @@ CREATE PUBLICATION name - + WITH ( publication_parameter [= value] [, ... ] ) @@ -166,7 +166,7 @@ CREATE PUBLICATION name following parameters are supported: - + publish (string) @@ -188,7 +188,7 @@ CREATE PUBLICATION name - + publish_via_partition_root (boolean) diff --git a/doc/src/sgml/ref/create_subscription.sgml b/doc/src/sgml/ref/create_subscription.sgml index 5469f57dd8..2e4105d36e 100644 --- a/doc/src/sgml/ref/create_subscription.sgml +++ b/doc/src/sgml/ref/create_subscription.sgml @@ -438,16 +438,18 @@ CREATE SUBSCRIPTION subscription_nameWHERE clauses, if one of the publications has no WHERE clause (referring to that publish operation) or the publication is declared as - FOR ALL TABLES or - FOR TABLES IN SCHEMA, rows are always published - regardless of the definition of the other expressions. - If the subscriber is a PostgreSQL version before - 15, then any row filtering is ignored during the initial data synchronization - phase. For this case, the user might want to consider deleting any initially - copied data that would be incompatible with subsequent filtering. - Because initial data synchronization does not take into account the publication - publish parameter when copying existing table data, some rows - may be copied that would not be replicated using DML. See + FOR ALL TABLES + or FOR TABLES IN SCHEMA, + rows are always published regardless of the definition of the other + expressions. If the subscriber is a PostgreSQL + version before 15, then any row filtering is ignored during the initial data + synchronization phase. For this case, the user might want to consider + deleting any initially copied data that would be incompatible with + subsequent filtering. Because initial data synchronization does not take + into account the publication + publish + parameter when copying existing table data, some rows may be copied that + would not be replicated using DML. See for examples. diff --git a/doc/src/sgml/system-views.sgml b/doc/src/sgml/system-views.sgml index 7c8fc3f654..bb1a418450 100644 --- a/doc/src/sgml/system-views.sgml +++ b/doc/src/sgml/system-views.sgml @@ -2145,9 +2145,10 @@ SELECT * FROM pg_locks pl LEFT JOIN pg_prepared_xacts ppx information about the mapping between publications and information of tables they contain. Unlike the underlying catalog pg_publication_rel, - this view expands publications defined as FOR ALL TABLES - and FOR TABLES IN SCHEMA, so for such publications - there will be a row for each eligible table. + this view expands publications defined as + FOR ALL TABLES + and FOR TABLES IN SCHEMA, + so for such publications there will be a row for each eligible table.