Hello all,
While working on our internal tools that utilise replication, we
realised that a new parameter was added to the internal C function
corresponding to pg_replication_origin_session_setup.
However this parameter wasn't included in the user-facing API [1].
In 'src/backend/replication/logical/origin.c' at line 1359,
pg_replication_origin_session_setup function calls
replorigin_session_setup(origin, 0);
where currently 0 is assigned to the acquired_by parameter of the
replorigin_session_setup.
I made this patch to the master which adds a way to control this
parameter by adding a new version of the
pg_replication_origin_session_setup function with user facing
parameters 'text int4' in place of the current 'text' while keeping
the existing variant
(ensuring backwards compatibility). Could someone take a look at it?
[1]: https://www.postgresql.org/docs/current/functions-admin.html#PG-REPLICATION-ORIGIN-SESSION-SETUP
---
Thanks for the help,
Doruk Yılmaz