pgsql: Remove unnecessary break in pg_logical_replication_slot_advance(

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Remove unnecessary break in pg_logical_replication_slot_advance(
Date: 2023-10-23 01:22:43
Message-ID: E1qujeV-001tdY-0F@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2023-10-23 19:17:02 pgsql: Refactor parse_filename_for_nontemp_relation to parse more.
Previous Message Michael Paquier 2023-10-23 01:00:42 pgsql: doc: Fix some grammar and inconsistent tags