Re: Remove extraneous break condition in logical slot advance function
Gurjeet Singh <gurjeet@singh.im>
From: Gurjeet Singh <gurjeet@singh.im>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-10-21T16:56:15Z
Lists: pgsql-hackers
On Fri, Oct 20, 2023 at 7:30 PM Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote: > > Hi, > > There exists an extraneous break condition in > pg_logical_replication_slot_advance(). When the end of WAL or moveto > LSN is reached, the main while condition helps to exit the loop, so no > separate break condition is needed. Attached patch removes it. > > Thoughts? +1 for the patch. The only advantage I see of the code as it stands right now is that it avoids one last call to CHECK_FOR_INTERRUPTS() by break'ing early. I don't think we'd lose much in terms of performance by making one (very cheap, in common case) extra call of this macro. Best regards, Gurjeet http://Gurje.et
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Remove unnecessary break in pg_logical_replication_slot_advance()
- b6f1cca9ba3d 17.0 landed