Refactor replication origin state reset helpers.

Masahiko Sawada <msawada@postgresql.org>

Commit: 227eb4eea20575d9ef0aac0bdae7b6c2ba261f34
Author: Masahiko Sawada <msawada@postgresql.org>
Date: 2026-01-28T19:45:26Z
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 <lic@highgo.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Discussion: https://postgr.es/m/CAEoWx2=pYvfRthXHTzSrOsf5_FfyY4zJyK4zV2v4W=yjUij1cA@mail.gmail.com

Files

Discussion