postgres/contrib/test_decoding/sql
Amit Kapila 5b148706c5 Add optional pid parameter to pg_replication_origin_session_setup().
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
2025-09-19 05:38:40 +00:00
..
binary.sql test_decoding: Protect against rare spurious test failures. 2015-09-22 15:39:46 +02:00
ddl.sql Make test_decoding ddl.out shorter 2023-07-24 17:48:06 +02:00
decoding_in_xact.sql Make RelationFlushRelation() work without ResourceOwner during abort 2024-06-06 18:56:28 +03:00
decoding_into_rel.sql Revert "Logical decoding of sequences" 2022-04-07 20:06:36 +02:00
messages.sql Add flush option to pg_logical_emit_message() 2023-10-18 11:24:59 +09:00
permissions.sql Add a slot synchronization function. 2024-02-14 09:45:36 +05:30
prepared.sql Add skip-empty-xacts option to test_decoding for use in the regression tests. 2014-09-01 15:59:44 +02:00
replorigin.sql Add optional pid parameter to pg_replication_origin_session_setup(). 2025-09-19 05:38:40 +00:00
rewrite.sql Revert "Logical decoding of sequences" 2022-04-07 20:06:36 +02:00
slot.sql Add a slot synchronization function. 2024-02-14 09:45:36 +05:30
spill.sql Make contrib/test_decoding regression tests safe for CZ locale. 2016-11-21 20:39:28 -05:00
stats.sql Skip logical decoding of already-aborted transactions. 2025-02-12 16:31:34 -08:00
stream.sql Skip logical decoding of already-aborted transactions. 2025-02-12 16:31:34 -08:00
time.sql logical decoding: fix decoding of a commit's commit time. 2016-03-02 23:42:21 -08:00
toast.sql Revert "Logical decoding of sequences" 2022-04-07 20:06:36 +02:00
truncate.sql Revert "Logical decoding of sequences" 2022-04-07 20:06:36 +02:00
twophase_stream.sql Add option to enable two_phase commits via pg_create_logical_replication_slot. 2021-03-03 07:34:11 +05:30
twophase.sql Stabilize the test added by commit 022564f60c. 2024-10-08 12:25:52 +05:30
xact.sql Don't propagate a null subtransaction snapshot up to parent transaction. 2016-08-07 13:15:55 -04:00