From abe9f4c56d931e12f6e8a9e3d1c1d88fff7e4149 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Mon, 28 Aug 2023 09:29:50 +1000 Subject: [PATCH v1] Fix am_xxx function Asserts --- src/include/replication/worker_internal.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/include/replication/worker_internal.h b/src/include/replication/worker_internal.h index 8f4bed0..dd94543 100644 --- a/src/include/replication/worker_internal.h +++ b/src/include/replication/worker_internal.h @@ -335,7 +335,8 @@ extern void pa_xact_finish(ParallelApplyWorkerInfo *winfo, static inline bool am_tablesync_worker(void) { - return isTablesyncWorker(MyLogicalRepWorker); + Assert(MyLogicalRepWorker->in_use); + return (MyLogicalRepWorker->type == WORKERTYPE_TABLESYNC); } static inline bool @@ -349,7 +350,7 @@ static inline bool am_parallel_apply_worker(void) { Assert(MyLogicalRepWorker->in_use); - return isParallelApplyWorker(MyLogicalRepWorker); + return (MyLogicalRepWorker->type == WORKERTYPE_PARALLEL_APPLY); } #endif /* WORKER_INTERNAL_H */ -- 1.8.3.1