pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove unnecessary break in pg_logical_replication_slot_advance(
Date: Mon, 23 Oct 2023 01:22:43 +0000
Message-ID: <E1qujeV-001tdY-0F@gemulon.postgresql.org> (raw)

Remove unnecessary break in pg_logical_replication_slot_advance()

pg_logical_replication_slot_advance() included a break condition to stop
when a targeted LSN is reached, when processing a series of WAL records
with XLogReadRecord().  Since 38a957316d7e, it matched with the check of
its main while loop.  This condition saved from an extra CFI check,
actually pointless, so let's remove this condition and simplify the
code.

In passing, fix an incorrect comment.

Author: Bharath Rupireddy
Reviewed-by: Tom Lane, Gurjeet Singh
Discussion: https://postgr.es/m/CALj2ACWfGDLQ2cy7ZKwxnJqbDkO6Yvqqrqxne5ZN4HYm=PRTGg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b6f1cca9ba3d24c8fcaa9facc30c96bcc50b37aa

Modified Files
--------------
src/backend/replication/slotfuncs.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)



Message-ID: <E1qujeV-001tdY-0F@gemulon.postgresql.org>
Permalink:  ../E1qujeV-001tdY-0F@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qujeV-001tdY-0F@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: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Remove unnecessary break in pg_logical_replication_slot_advance(
  In-Reply-To: <E1qujeV-001tdY-0F@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