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 <[email protected]> Reviewed-by: Masahiko Sawada <[email protected]> Reviewed-by: Ashutosh Bapat <[email protected]> Reviewed-by: Álvaro Herrera <[email protected]> Discussion: https://postgr.es/m/CAEoWx2=pYvfRthXHTzSrOsf5_FfyY4zJyK4zV2v4W=yjuij...@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(-)
