pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor replorigin_session_setup() for better readability.
Date: Thu, 26 Mar 2026 03:51:59 +0000
Message-ID: <E1w5blG-001U5U-2K@gemulon.postgresql.org> (raw)

Refactor replorigin_session_setup() for better readability.

Reorder the validation checks in replorigin_session_setup() to provide a
more logical flow. This makes the function easier to follow and ensures
that basic state checks are performed consistently.

Additionally, update an error message to align its phrasing with similar
diagnostics in the replication origin subsystem, improving overall
consistency.

Author: Heikki Linnakangas <hlinnaka@iki.fi>
Reviewed-by: shveta malik <shveta.malik@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Discussion: https://postgr.es/m/e0508305-bc6a-417c-b969-36564d632f9e@iki.fi

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/735e8fe685359480e77d837493a5dc0a38866944

Modified Files
--------------
src/backend/replication/logical/origin.c | 79 +++++++++++++++++++-------------
1 file changed, 47 insertions(+), 32 deletions(-)



Message-ID: <E1w5blG-001U5U-2K@gemulon.postgresql.org>
Permalink:  ../E1w5blG-001U5U-2K@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1w5blG-001U5U-2K@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: akapila@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Refactor replorigin_session_setup() for better readability.
  In-Reply-To: <E1w5blG-001U5U-2K@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox