]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Refactor replication origin state reset helpers.
authorMasahiko Sawada <msawada@postgresql.org>
Wed, 28 Jan 2026 19:45:26 +0000 (11:45 -0800)
committerMasahiko Sawada <msawada@postgresql.org>
Wed, 28 Jan 2026 19:45:26 +0000 (11:45 -0800)
commit227eb4eea20575d9ef0aac0bdae7b6c2ba261f34
treeff3cdc769e767fbd2ac9d3370af5c42b778cc7e5
parent1fdbca159e0055fefc0b391ec09520d0b3bd9248
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
src/backend/replication/logical/origin.c
src/backend/replication/logical/tablesync.c
src/backend/replication/logical/worker.c
src/include/replication/origin.h