pgsql: Add worker type argument to logical replication worker functions

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add worker type argument to logical replication worker functions
Date: 2025-10-28 05:52:13
Message-ID: E1vDccv-003sKa-2F@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add worker type argument to logical replication worker functions.

Extend logicalrep_worker_stop, logicalrep_worker_wakeup, and
logicalrep_worker_find to accept a worker type argument. This change
enables differentiation between logical replication worker types, such as
apply workers and table sync workers. While preserving existing behavior,
it lays the groundwork for upcoming patch to add sequence synchronization
workers.

Author: Vignesh C <vignesh21(at)gmail(dot)com>
Reviewed-by: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Reviewed-by: Peter Smith <smithpb2250(at)gmail(dot)com>
Reviewed-by: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Reviewed-by: Hayato Kuroda <kuroda(dot)hayato(at)fujitsu(dot)com>
Reviewed-by: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAA4eK1LC+KJiAkSrpE_NwvNdidw9F2os7GERUeSxSKv71gXysQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3e8e05596a020f043f1efd6406e4511ea85170bd

Modified Files
--------------
src/backend/commands/subscriptioncmds.c | 4 +--
src/backend/replication/logical/launcher.c | 40 +++++++++++++++++++----------
src/backend/replication/logical/syncutils.c | 3 ++-
src/backend/replication/logical/tablesync.c | 11 +++++---
src/backend/replication/logical/worker.c | 8 +++---
src/include/replication/worker_internal.h | 9 ++++---
6 files changed, 49 insertions(+), 26 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2025-10-28 07:22:07 pgsql: Add wal_fpi_bytes to pg_stat_wal and pg_stat_get_backend_wal()
Previous Message Michael Paquier 2025-10-27 23:27:32 pgsql: Simplify newline handling in two TAP tests