Re: PG DOCS - logical replication filtering
Euler Taveira <euler@eulerto.com>
From: "Euler Taveira" <euler@eulerto.com>
To: "Peter Smith" <smithpb2250@gmail.com>,
"Aleksander Alekseev" <aleksander@timescale.com>
Cc: "Amit Kapila" <amit.kapila16@gmail.com>,
"PostgreSQL Hackers" <pgsql-hackers@lists.postgresql.org>
Date: 2022-03-10T23:06:38Z
Lists: pgsql-hackers
Attachments
- v4-0001-doc-new-section-for-row-filter.patch (text/x-patch) patch v4-0001
On Fri, Mar 4, 2022, at 12:41 AM, Peter Smith wrote: > PSA patch v3 to address all comments received so far. Peter, I started reviewing this documentation for row filter and I noticed that I was changing too much lines to submit a patch on the top of it. Hence, I'm attaching a new version based on this one. Here as some of the changes that I did: * links: I renamed the ids to use "logical-replication-row-filter" instead of "logical-replication-rf" because it is used in the anchors. A compound word is better than an abbreviation. * titles: I changed all titles because of some stylish issue (words are generally capitalized) or because it reads better. * sections: I moved the "Restrictions" section to the top but it seems important than the other sections. I removed the "psql" section. The psql commands are shown in the "Examples" section so I don't think we should provide a section for it. * sentences: I expanded several sentences to provide details about the specific topic. I also reordered some sentences and removed some duplicated sentences. * replica identity: I added a link to replica identity. It is a key concept for row filter. * transformations: I added a few sentences explaining when/why a transformation is required. I removed the "Cases" part (same as in the source code) because it is redundant with the new sentences. * partitioned table: the title should be _partitioned_ table. I replaced the bullets with sentences in the same paragraph. * initial data sync: I removed the "subscriber" from the section title. When you say "initial data synchronization" it seems clear we're talking about the subscriber. I also add a sentence saying why pre-15 does not consider row filters. * combining row filters: I renamed the section and decided to remove "for the same table". When reading the first sentences from this section, it is clear that row filtering is per table. So if you are combining multiple row filters, it should be for the same table. I also added a sentence saying why some clauses make the row filter irrelevant. * examples: I combined the psql commands that shows row filter information together (\dRp+ and \d). I changed to connection string to avoid "localhost". Why? It does not seem a separate service (there is no port) and setup pub/sub in the same cluster requires additional steps. It is better to illustrate different clusters (at least it seems so since we don't provide details from publisher). I changed a value in an UPDATE because both UPDATEs use 999. We could probably reduce the number of rows in the example but I didn't bother to remove them. It seems we can remove some sentences from the CREATE PUBLICATION because we have a new section that explains all of it. I think the link that was added by this patch is sufficient. -- Euler Taveira EDB https://www.enterprisedb.com/
Commits
-
Add additional documentation for row filters.
- 676eeb6dd165 15.0 landed
-
Allow specifying row filters for logical replication of tables.
- 52e4f0cd472d 15.0 cited