Re: row filtering for logical replication

Peter Smith <smithpb2250@gmail.com>

From: Peter Smith <smithpb2250@gmail.com>
To: "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>
Cc: "tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>, Amit Kapila <amit.kapila16@gmail.com>, Euler Taveira <euler@eulerto.com>, Greg Nancarrow <gregn4422@gmail.com>, vignesh C <vignesh21@gmail.com>, Ajin Cherian <itsajin@gmail.com>, Dilip Kumar <dilipbalaut@gmail.com>, Rahila Syed <rahilasyed90@gmail.com>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>, Önder Kalacı <onderkalaci@gmail.com>, japin <japinli@hotmail.com>, Michael Paquier <michael@paquier.xyz>, David Steele <david@pgmasters.net>, Craig Ringer <craig@2ndquadrant.com>, Amit Langote <amitlangote09@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-01-06T12:10:07Z
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 →
  1. Release cache tuple when no longer needed

  2. Add some additional tests for row filters in logical replication.

  3. Fix one of the tests introduced in commit 52e4f0cd47.

  4. Allow specifying row filters for logical replication of tables.

  5. Move scanint8() to numutils.c

  6. Replace Test::More plans with done_testing

  7. Reduce relcache access in WAL sender streaming logical changes

  8. Small cleanups related to PUBLICATION framework code

  9. Add a view to show the stats of subscription workers.

  10. Allow publishing the tables of schema.

  11. Doc: improve documentation of CREATE/ALTER SUBSCRIPTION.

  12. Add PublicationTable and PublicationRelInfo structs

  13. Remove unused argument "txn" in maybe_send_schema().

  14. Add prepare API support for streaming transactions in logical replication.

  15. Unify PostgresNode's new() and get_new_node() methods

  16. Use l*_node() family of functions where appropriate

  17. Add support for prepared transactions to built-in logical replication.

  18. Restore the portal-level snapshot after procedure COMMIT/ROLLBACK.

  19. Rename a parse node to be more general

  20. Remove unused column atttypmod from initial tablesync query

  21. SEARCH and CYCLE clauses

Attachments

On Thu, Jan 6, 2022 at 9:29 AM Peter Smith <smithpb2250@gmail.com> wrote:
>
> FYI - v58 is currently known to be broken due to a recent commit [1].
>
> I plan to post a v59* later today to address this as well as other
> recent review comments.
>
> ------
> [1] https://github.com/postgres/postgres/commit/6ce16088bfed97f982f66a9dc17b8364df289e4d
>
> Kind Regards,
> Peter Smith.
> Fujitsu Australia.


Here is the v59* patch set:

Main changes from v58* are
0. Rebase to HEAD (needed after recent commit [1])
1. Multiple review comments addressed

~~

Details
=======

v58-0001 (main)
- Fixed some typos for commit message
- Made PG docs wording more consistent [5/1 Peter] #1,#2
- Modified tablesync SQL using Vignesh improvements [22/12 Amit] and
Tang improvements [internal]
- Fixed whitespace [5/1 Peter] #3
- Moved code below comment [5/1 Peter] #4
- Fixed typos/wording in comments [5/1 Peter] #5,#6,#7,#8,#9,#10,#13
- Removed parse_node.h from this patch [5/1 Peter] #12, [5/1 Vignesh] #4
- Used for_each_from macro in tablesync [5/1 Wangw] #1
- Reverted unnecessary signature change of get_rel_sync_entry [5/1 Wangw] #2
- Moved #define outside of struct [5/1 Amit #define]

v58-0002 (new/old tuple)
- Modified signature of pgoutput_row_file_update_check [29/12 Tang] #3
- Removed unnecessary assignments of *action [5/1 Amit *action]

v58-0003 (tab, dump)
- no change

v58-0004 (refactor transformations)
- no change

------
[1] https://github.com/postgres/postgres/commit/6ce16088bfed97f982f66a9dc17b8364df289e4d
[22/12 Amit] https://www.postgresql.org/message-id/CAA4eK1JNRE1dQR_xQT-2pFFHMTXzb%3DCf68Dw3N_5swvrz0D8tw%40mail.gmail.com
[29/12 Tang] https://www.postgresql.org/message-id/OS0PR01MB611317903619FE04C42AD1ECFB449%40OS0PR01MB6113.jpnprd01.prod.outlook.com
[5/1 Amit #define]
https://www.postgresql.org/message-id/CAA4eK1K5%3DFZ47va1NjTrSJADCf91%3D251LtvqBxNjt4vtZGjPGw%40mail.gmail.com
[5/1 Amit *action]
https://www.postgresql.org/message-id/CAA4eK1Ktt5GrzM8hHWn9htg_Cfn-7y0VN6zFFyqQM4FxEjc5Rg%40mail.gmail.com
[5/1 Peter] https://www.postgresql.org/message-id/CAHut%2BPvp_O%2BZQf11kOyhO80YHUQnPQZMDRrm2ce%2BryY36H_TPw%40mail.gmail.com
[5/1 Vignesh] https://www.postgresql.org/message-id/CALDaNm13yVPH0EcObv4tCHLQfUwjfvPFh8c-nd3Ldg71Y9es7A%40mail.gmail.com
[5/1 Wangw] https://www.postgresql.org/message-id/OS3PR01MB6275ADE2B0EDED067C136D539E4B9%40OS3PR01MB6275.jpnprd01.prod.outlook.com

Kind Regards,
Peter Smith.
Fujitsu Australia