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(-)