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=d0bhxwkaeancaym1xqcv...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/1cdc6d86bfc3bbe2189a4d9d54a4fa8b6c98ea0a Modified Files -------------- src/backend/replication/logical/launcher.c | 57 ++++++++++++++++------------- src/backend/replication/logical/tablesync.c | 33 +++++++++++------ src/backend/replication/logical/worker.c | 43 +++++++++++++--------- 3 files changed, 79 insertions(+), 54 deletions(-)