mirror of
https://github.com/postgres/postgres.git
synced 2025-10-16 17:07:43 +03:00
Commit 216a784829
introduced parallel apply workers, allowing multiple
processes to share a replication origin. To support this,
replorigin_session_setup() was extended to accept a pid argument
identifying the process using the origin.
This commit exposes that capability through the SQL interface function
pg_replication_origin_session_setup() by adding an optional pid parameter.
This enables multiple processes to coordinate replication using the same
origin when using SQL-level replication functions.
This change allows the non-builtin logical replication solutions to
implement parallel apply for large transactions.
Additionally, an existing internal error was made user-facing, as it can
now be triggered via the exposed SQL API.
Author: Doruk Yilmaz <doruk@mixrank.com>
Author: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Euler Taveira <euler@eulerto.com>
Discussion: https://postgr.es/m/CAMPB6wfe4zLjJL8jiZV5kjjpwBM2=rTRme0UCL7Ra4L8MTVdOg@mail.gmail.com
Discussion: https://postgr.es/m/CAE2gYzyTSNvHY1+iWUwykaLETSuAZsCWyryokjP6rG46ZvRgQA@mail.gmail.com
39 lines
1.4 KiB
Makefile
39 lines
1.4 KiB
Makefile
# contrib/test_decoding/Makefile
|
|
|
|
MODULES = test_decoding
|
|
PGFILEDESC = "test_decoding - example of a logical decoding output plugin"
|
|
|
|
REGRESS = ddl xact rewrite toast permissions decoding_in_xact \
|
|
decoding_into_rel binary prepared replorigin time messages \
|
|
spill slot truncate stream stats twophase twophase_stream
|
|
ISOLATION = mxact delayed_startup ondisk_startup concurrent_ddl_dml \
|
|
oldest_xmin snapshot_transfer subxact_without_top concurrent_stream \
|
|
twophase_snapshot slot_creation_error catalog_change_snapshot \
|
|
skip_snapshot_restore invalidation_distribution parallel_session_origin
|
|
|
|
REGRESS_OPTS = --temp-config $(top_srcdir)/contrib/test_decoding/logical.conf
|
|
ISOLATION_OPTS = --temp-config $(top_srcdir)/contrib/test_decoding/logical.conf
|
|
|
|
# Disabled because these tests require "wal_level=logical", which
|
|
# typical installcheck users do not have (e.g. buildfarm clients).
|
|
NO_INSTALLCHECK = 1
|
|
|
|
TAP_TESTS = 1
|
|
|
|
ifdef USE_PGXS
|
|
PG_CONFIG = pg_config
|
|
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
|
include $(PGXS)
|
|
else
|
|
subdir = contrib/test_decoding
|
|
top_builddir = ../..
|
|
include $(top_builddir)/src/Makefile.global
|
|
include $(top_srcdir)/contrib/contrib-global.mk
|
|
endif
|
|
|
|
# But it can nonetheless be very helpful to run tests on preexisting
|
|
# installation, allow to do so, but only if requested explicitly.
|
|
installcheck-force:
|
|
$(pg_regress_installcheck) $(REGRESS)
|
|
$(pg_isolation_regress_installcheck) $(ISOLATION)
|