From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add a common function to generate the origin name.
Date: Tue, 11 Oct 2022 05:21:14 +0000
Message-ID: <E1oi7ha-001qle-3I@gemulon.postgresql.org> (raw)
Add a common function to generate the origin name.
Make a common replication origin name formatting function to replace
multiple snprintf() expressions. This also includes logic previously done
by ReplicationOriginNameForTablesync().
This makes the code to generate the origin name consistent among apply
worker and tablesync worker.
Author: Peter Smith
Reviewed-By: Aleksander Alekseev
Discussion: https://postgr.es/m/CAHut%2BPsa8hhfSE6ozUK-ih7GkQziAVAf4f3bqiXEj2nQiu-43g%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/776e1c8a5d1494e345e5e1b16a5eba5e98aaddca
Modified Files
--------------
src/backend/commands/subscriptioncmds.c | 15 ++++++------
src/backend/replication/logical/tablesync.c | 36 ++++++++++-------------------
src/backend/replication/logical/worker.c | 35 ++++++++++++++++++++++++----
src/include/replication/worker_internal.h | 4 ++--
4 files changed, 52 insertions(+), 38 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: akapila@postgresql.org
Subject: Re: pgsql: Add a common function to generate the origin name.
In-Reply-To: <E1oi7ha-001qle-3I@gemulon.postgresql.org>
References: <E1oi7ha-001qle-3I@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox