Refactor code in charge of grabbing the relations of a subscription
Michael Paquier <michael@paquier.xyz>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/pg_subscription.c | modified | +10 −60 |
| src/backend/commands/subscriptioncmds.c | modified | +2 −2 |
| src/backend/replication/logical/tablesync.c | modified | +1 −1 |
| src/include/catalog/pg_subscription_rel.h | modified | +1 −2 |
Discussion
- Refactor to make use of a common function for GetSubscriptionRelations and GetSubscriptionNotReadyRelations. 22 messages · 2022-07-13 → 2022-07-27