RE: row filtering for logical replication
tanghy <tanghy.fnst@fujitsu.com>
Commits
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Release cache tuple when no longer needed
- ed0fbc8e5ac9 15.0 landed
-
Add some additional tests for row filters in logical replication.
- ceb57afd3ce1 15.0 landed
-
Fix one of the tests introduced in commit 52e4f0cd47.
- cfb4e209ec15 15.0 landed
-
Allow specifying row filters for logical replication of tables.
- 52e4f0cd472d 15.0 landed
-
Move scanint8() to numutils.c
- cfc7191dfea3 15.0 cited
-
Replace Test::More plans with done_testing
- 549ec201d613 15.0 cited
-
Reduce relcache access in WAL sender streaming logical changes
- 6ce16088bfed 15.0 cited
-
Small cleanups related to PUBLICATION framework code
- c9105dd3660f 15.0 cited
-
Add a view to show the stats of subscription workers.
- 8d74fc96db5f 15.0 cited
-
Allow publishing the tables of schema.
- 5a2832465fd8 15.0 cited
-
Doc: improve documentation of CREATE/ALTER SUBSCRIPTION.
- 1882d6cca161 15.0 cited
-
Add PublicationTable and PublicationRelInfo structs
- 0c6828fa987b 15.0 cited
-
Remove unused argument "txn" in maybe_send_schema().
- 93d573d86571 15.0 cited
-
Add prepare API support for streaming transactions in logical replication.
- 63cf61cdeb7b 15.0 cited
-
Unify PostgresNode's new() and get_new_node() methods
- 201a76183e20 15.0 cited
-
Use l*_node() family of functions where appropriate
- 2b00db4fb0c7 15.0 cited
-
Add support for prepared transactions to built-in logical replication.
- a8fd13cab0ba 15.0 cited
-
Restore the portal-level snapshot after procedure COMMIT/ROLLBACK.
- ef9480509622 11.13 cited
-
Rename a parse node to be more general
- 91d1f2d30210 14.0 landed
-
Remove unused column atttypmod from initial tablesync query
- 4ad31bb2ef25 14.0 landed
-
SEARCH and CYCLE clauses
- 3696a600e229 14.0 cited
Attachments
- workload-c-syncrep.PNG (image/png)
- workload-d-pg_recvlogical.PNG (image/png)
- workload-d-syncrep.PNG (image/png)
- performance_test_using_pg_recvlogical.txt (text/plain)
- performance_test_using_sync_replication.txt (text/plain)
- workload-a-pg_recvlogical.PNG (image/png)
- workload-a-syncrep.PNG (image/png)
- workload-b-pg_recvlogical.PNG (image/png)
- workload-b-syncrep.PNG (image/png)
- workload-c-pg_recvlogical.PNG (image/png)
On Saturday, January 29, 2022 9:31 AM, From: Andres Freund <andres@anarazel.de> > Hi, > > Are there any recent performance evaluations of the overhead of row filters? > I > think it'd be good to get some numbers comparing: > > 1) $workload with master > 2) $workload with patch, but no row filters > 3) $workload with patch, row filter matching everything > 4) $workload with patch, row filter matching few rows > > For workload I think it'd be worth testing: > a) bulk COPY/INSERT into one table > b) Many transactions doing small modifications to one table > c) Many transactions targetting many different tables > d) Interspersed DDL + small changes to a table I did the performance test for this patch in two ways: (1) using pg_recvlogical (2) using synchronous pub/sub The results are as below, also attach the bar charts and the details. Note that the result of performance test using pg_recvlogical is based on v80, and the one using synchronous pub/sub is based on v81. (I think v80 should have the same performance as V81 because V81 only fix some test related code compared with V80) (1) Using pg_recvlogical RESULTS - workload "a" ----------------------------- HEAD 4.350 No Filters 4.413 Allow 100% 4.463 Allow 75% 4.079 Allow 50% 3.765 Allow 25% 3.415 Allow 0% 3.104 RESULTS - workload "b" ----------------------------- HEAD 0.568 No Filters 0.569 Allow 100% 0.590 Allow 75% 0.510 Allow 50% 0.441 Allow 25% 0.370 Allow 0% 0.302 RESULTS - workload "c" ----------------------------- HEAD 2.752 No Filters 2.812 Allow 100% 2.846 Allow 75% 2.506 Allow 50% 2.147 Allow 25% 1.806 Allow 0% 1.448 RESULTS - workload "d" ----------------------------- HEAD 5.612 No Filters 5.645 Allow 100% 5.696 Allow 75% 5.648 Allow 50% 5.532 Allow 25% 5.379 Allow 0% 5.196 Summary of tests: (a) As more data is filtered out, less time is spend. (b) The case where no rows are filtered (worst case), there is a overhead of 1-4%. This should be okay as normally nobody will set up filters which doesn't filter any rows. (c) There is slight difference in HEAD and No filter (0-2%) case but some of that could also be attributed to run-to-run variation because in some runs no filter patch was taking lesser time and in other cases HEAD is taking lesser time. (2) Using synchronous pub/sub RESULTS - workload "a" ----------------------------- HEAD 9.671 No Filters 9.727 Allow 100% 10.336 Allow 75% 8.544 Allow 50% 7.598 Allow 25% 5.988 Allow 0% 4.542 RESULTS - workload "b" ----------------------------- HEAD 53.869 No Filters 53.531 Allow 100% 52.679 Allow 75% 39.782 Allow 50% 26.563 Allow 25% 13.506 Allow 0% 0.296 RESULTS - workload "c" ----------------------------- HEAD 52.378 No Filters 52.432 Allow 100% 51.974 Allow 75% 39.452 Allow 50% 26.604 Allow 25% 13.944 Allow 0% 1.194 RESULTS - workload "d" ----------------------------- HEAD 57.457 No Filters 57.385 Allow 100% 57.608 Allow 75% 43.575 Allow 50% 29.689 Allow 25% 15.786 Allow 0% 2.879 Summary of tests: (a) As more data is filtered out, less time is spend. (b) The case where no rows are filtered (worst case). There is a overhead in scenario a (bulk INSERT). This should be okay as normally nobody will set up filters which doesn't filter any rows. In other scenarios (doing small modifications to one table, targeting many different tables, and Interspersed DDL + small changes to a table), there is almost no overhead. (c) There is almost no time difference in HEAD and No filter. Regards, Tang