pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor code in charge of grabbing the relations of a subscript
Date: Wed, 27 Jul 2022 10:51:25 +0000
Message-ID: <E1oGedQ-001TNS-3D@gemulon.postgresql.org> (raw)

Refactor code in charge of grabbing the relations of a subscription

GetSubscriptionRelations() and GetSubscriptionNotReadyRelations() share
mostly the same code, which scans pg_subscription_rel and fetches all
the relations of a given subscription.  The only difference is that the
second routine looks for all the relations not in a ready state.  This
commit refactors the code to use a single routine, shaving a bit of
code.

Author: Vignesh C
Reviewed-By: Kyotaro Horiguchi, Amit Kapila, Michael Paquier, Peter
Smith
Discussion: https://postgr.es/m/CALDaNm0eW-9g4G_EzHebnFT5zZoasWCS_EzZQ5BgnLZny9S=pg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ce3049b0215b63744d11c0ce3ac6afdb67fc2ff0

Modified Files
--------------
src/backend/catalog/pg_subscription.c       | 70 +++++------------------------
src/backend/commands/subscriptioncmds.c     |  4 +-
src/backend/replication/logical/tablesync.c |  2 +-
src/include/catalog/pg_subscription_rel.h   |  3 +-
4 files changed, 14 insertions(+), 65 deletions(-)



Message-ID: <E1oGedQ-001TNS-3D@gemulon.postgresql.org>
Permalink:  ../E1oGedQ-001TNS-3D@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1oGedQ-001TNS-3D@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Refactor code in charge of grabbing the relations of a subscript
  In-Reply-To: <E1oGedQ-001TNS-3D@gemulon.postgresql.org>
  References: <E1oGedQ-001TNS-3D@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