Re: adding partitioned tables to publications
amit <amitlangote09@gmail.com>
From: Amit Langote <amitlangote09@gmail.com>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Rafia Sabih <rafia.pghackers@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-01-29T07:29:55Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix RELCACHE_FORCE_RELEASE issue
- 12fb189bfeaf 13.0 landed
-
Allow publishing partition changes via ancestors
- 83fd4532a721 13.0 landed
-
Add logical replication support to replicate into partitioned tables
- f1ac27bfda6c 13.0 landed
-
Refactor code to look up local replication tuple
- d8653f468789 13.0 landed
-
Some refactoring of logical/worker.c
- 97ee604d9bce 13.0 landed
-
Prepare to support non-tables in publications
- c314c147c056 13.0 landed
-
Support adding partitioned tables to publication
- 17b9e7f9fe23 13.0 landed
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