Simplify the logical worker type checks by using the switch on worker type.
Amit Kapila <akapila@postgresql.org>
Simplify the logical worker type checks by using the switch on worker type. The current code uses if/else statements at various places to take worker specific actions. Change those to use the switch on worker type added by commit 2a8b40e368. This makes code easier to read and understand. Author: Peter Smith Reviewed-by: Amit Kapila, Hou Zhijie Discussion: http://postgr.es/m/CAHut+PttPSuP0yoZ=9zLDXKqTJ=d0bhxwKaEaNcaym1XqcvDEg@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/replication/logical/launcher.c | modified | +31 −26 |
| src/backend/replication/logical/tablesync.c | modified | +22 −11 |
| src/backend/replication/logical/worker.c | modified | +26 −17 |
Discussion
- Adding a LogicalRepWorker type field 30 messages · 2023-07-31 → 2023-08-22