pgsql: Refactor replication origin state reset helpers.
pgsql: Refactor replication origin state reset helpers.
От:
Masahiko Sawada <msawada@postgresql.org>
Дата:
Refactor replication origin state reset helpers. Factor out common logic for clearing replorigin_session_* variables into a dedicated helper function, replorigin_xact_clear(). This removes duplicated assignments of these variables across multiple call sites, and makes the intended scope of each reset explicit. Author: Chao Li Reviewed-by: Masahiko Sawada Reviewed-by: Ashutosh Bapat Reviewed-by: Álvaro Herrera Discussion: https://postgr.es/m/CAEoWx2=pYvfRthXHTzSrOsf5_FfyY4zJyK4zV2v4W=yjUij1cA@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/227eb4eea20575d9ef0aac0bdae7b6c2ba261f34 Modified Files -------------- src/backend/replication/logical/origin.c | 21 ++++++++++++++++----- src/backend/replication/logical/tablesync.c | 4 +--- src/backend/replication/logical/worker.c | 14 ++++++-------- src/include/replication/origin.h | 3 +++ 4 files changed, 26 insertions(+), 16 deletions(-)