Re: Remove extraneous break condition in logical slot advance function

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gurjeet Singh <gurjeet(at)singh(dot)im>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Remove extraneous break condition in logical slot advance function
Date: 2023-10-23 01:24:30
Message-ID: ZTXLTpkSpQ-r4G8J@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Oct 22, 2023 at 11:59:00PM +0530, Bharath Rupireddy wrote:
> AFAICS, there's no correctness argument for breaking before CFI. As
> rightly said, CFIs can happen before the break condition either down
> inside LogicalDecodingProcessRecord or XLogReadRecord (page_read
> callbacks for instance).
>
> Having said that, what may happen if CFI happens and interrupts are
> processed before the break condition is that the decoding occurs again
> which IMV is not a big problem.
>
> An idea to keep all of XLogReadRecord() -
> LogicalDecodingProcessRecord() loops consistent is by having CFI at
> the start of the loops before the XLogReadRecord().

Passing by.. All that just looks like an oversight of 38a957316d7e
that simplified the main while loop, so I've just applied your v2.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message sirisha chamarthi 2023-10-23 01:26:23 Re: Why is hot_standby_feedback off by default?
Previous Message Michael Paquier 2023-10-23 01:00:43 Re: Show version of OpenSSL in ./configure output