pgsql: Simplify the logical worker type checks by using the switch on w - Mailing list pgsql-committers

From Amit Kapila
Subject pgsql: Simplify the logical worker type checks by using the switch on w
Date
Msg-id E1qYI9R-000Eu5-W1@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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

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(-)


pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: pgsql: doc: PG 16 relnotes: adjust RANGE/ROWS window item
Next
From: Peter Eisentraut
Date:
Subject: Re: pgsql: Improve BRIN minmax-multi opclass test coverage