v1-0001-Fix-am_xxx-function-Asserts.patch
application/octet-stream
Filename: v1-0001-Fix-am_xxx-function-Asserts.patch
Type: application/octet-stream
Part: 0
Patch
Format: format-patch
Series: patch v1-0001
Subject: Fix am_xxx function Asserts
| File | + | − |
|---|---|---|
| src/include/replication/worker_internal.h | 3 | 2 |
From abe9f4c56d931e12f6e8a9e3d1c1d88fff7e4149 Mon Sep 17 00:00:00 2001
From: Peter Smith <peter.b.smith@fujitsu.com>
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