TEST STEPS - Workload case a 1. Run initdb pub and sub and start both postgres instances (use the nosync postgresql.conf) 2. Run psql for both instances and create tables CREATE TABLE test (key int, value text, data jsonb, PRIMARY KEY(key, value)); 3. create the PUBLISHER on pub instance (e.g. choose from below depending on filter) CREATE PUBLICATION pub_1 FOR TABLE test; -- 100% (no filter) CREATE PUBLICATION pub_1 FOR TABLE test WHERE (key > 0); -- 100% allowed CREATE PUBLICATION pub_1 FOR TABLE test WHERE (key > 250000); -- 75% allowed CREATE PUBLICATION pub_1 FOR TABLE test WHERE (key > 500000); -- 50% allowed CREATE PUBLICATION pub_1 FOR TABLE test WHERE (key > 750000); -- 25% allowed CREATE PUBLICATION pub_1 FOR TABLE test WHERE (key > 1000000); -- 0% allowed 4. create the SUBSCRIBER on sub instance CREATE SUBSCRIPTION sync_sub CONNECTION 'host=127.0.0.1 port=5432 dbname=postgres application_name=sync_sub' PUBLICATION pub_1; 5. On pub side modify the postgresql.conf on the publisher side and restart \q quite psql edit synchronous_standby_names = 'sync_sub' restart the pub instance 6. Run psql (pub side) and perform the test run. \timing INSERT INTO test SELECT i, i::text, row_to_json(row(i)) FROM generate_series(1,1000001)i; select count(*) from test; TRUNCATE test; select count(*) from test; repeat 6 for each test run. ~~ Repeat from step 1 for different filter case.