pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Simplify the logical worker type checks by using the switch on w
Date: Tue, 22 Aug 2023 03:33:54 +0000
Message-ID: <E1qYI9R-000Eu5-W1@gemulon.postgresql.org> (raw)

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



Message-ID: <E1qYI9R-000Eu5-W1@gemulon.postgresql.org>
Permalink:  ../E1qYI9R-000Eu5-W1@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qYI9R-000Eu5-W1@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: akapila@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Simplify the logical worker type checks by using the switch on w
  In-Reply-To: <E1qYI9R-000Eu5-W1@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox