[Patch] add new parameter to pg_replication_origin_session_setup - Mailing list pgsql-hackers

From Doruk Yilmaz
Subject [Patch] add new parameter to pg_replication_origin_session_setup
Date
Msg-id CAMPB6wfe4zLjJL8jiZV5kjjpwBM2=rTRme0UCL7Ra4L8MTVdOg@mail.gmail.com
Whole thread Raw
Responses Re: [Patch] add new parameter to pg_replication_origin_session_setup
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Recent 027_streaming_regress.pl hangs
Next
From: Tom Lane
Date:
Subject: Re: ECPG cleanup and fix for clang compile-time problem