Add worker type argument to logical replication worker functions.
authorAmit Kapila <akapila@postgresql.org>
Tue, 28 Oct 2025 05:47:50 +0000 (05:47 +0000)
committerAmit Kapila <akapila@postgresql.org>
Tue, 28 Oct 2025 05:47:50 +0000 (05:47 +0000)
commit3e8e05596a020f043f1efd6406e4511ea85170bd
treed626b0568e8c05749880f5372761b30f054431a0
parent8767b449a3a1e75626dfb08f24da54933171d4c5
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@gmail.com>
Reviewed-by: shveta malik <shveta.malik@gmail.com>
Reviewed-by: Peter Smith <smithpb2250@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Discussion: https://postgr.es/m/CAA4eK1LC+KJiAkSrpE_NwvNdidw9F2os7GERUeSxSKv71gXysQ@mail.gmail.com
src/backend/commands/subscriptioncmds.c
src/backend/replication/logical/launcher.c
src/backend/replication/logical/syncutils.c
src/backend/replication/logical/tablesync.c
src/backend/replication/logical/worker.c
src/include/replication/worker_internal.h