Allow the logical_replication_mode to be used on the subscriber.
authorAmit Kapila <akapila@postgresql.org>
Thu, 2 Feb 2023 02:45:18 +0000 (08:15 +0530)
committerAmit Kapila <akapila@postgresql.org>
Thu, 2 Feb 2023 02:45:18 +0000 (08:15 +0530)
commit9f2213a7c575bae43a2d41abc8b60770066ca81c
tree5456fdc30b648c117a14f863d2c2857307485cd2
parentfb1a59de0c52609653166aafc6ce8679a9cfe54b
Allow the logical_replication_mode to be used on the subscriber.

Extend the existing developer option 'logical_replication_mode' to help
test the parallel apply of large transactions on the subscriber.

When set to 'buffered', the leader sends changes to parallel apply workers
via a shared memory queue. When set to 'immediate', the leader serializes
all changes to files and notifies the parallel apply workers to read and
apply them at the end of the transaction.

This helps in adding tests to cover the serialization code path in
parallel streaming mode.

Author: Hou Zhijie
Reviewed-by: Peter Smith, Kuroda Hayato, Sawada Masahiko, Amit Kapila
Discussion: https://postgr.es/m/CAA4eK1+wyN6zpaHUkCLorEWNx75MG0xhMwcFhvjqm2KURZEAGw@mail.gmail.com
doc/src/sgml/config.sgml
src/backend/replication/logical/applyparallelworker.c
src/backend/utils/misc/guc_tables.c
src/test/subscription/t/015_stream.pl
src/test/subscription/t/018_stream_subxact_abort.pl
src/test/subscription/t/023_twophase_stream.pl