Re: confirmed flush lsn seems to be move backward in certain error cases - Mailing list pgsql-hackers

From Tom Lane
Subject Re: confirmed flush lsn seems to be move backward in certain error cases
Date
Msg-id 1053870.1718133289@sss.pgh.pa.us
Whole thread Raw
In response to Re: confirmed flush lsn seems to be move backward in certain error cases  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
List pgsql-hackers
Tomas Vondra <tomas.vondra@enterprisedb.com> writes:
> Why should it be OK for the subscriber to confirm a flush LSN and then
> later take that back and report a lower LSN? Seems somewhat against my
> understanding of what "flush LSN" means.
> The commit message explains this happens when the subscriber does not
> need to do anything for - but then why shouldn't it just report the
> prior LSN, in such cases?

Yeah, I was wondering about that too when I saw the commit go by.

> I haven't looked into the details, but my concern is this removes an
> useful assert, protecting us against certain type of bugs. And now we'll
> just happily ignore them. Is that a good idea?

If we think this is a real protection, then it shouldn't be an Assert
anyway, because it will not protect production systems that way.
It needs to be regular test-and-elog.  Or maybe test-and-ignore-the-
bogus-value?  If you want to take this seriously then you need to
define a recovery procedure after the problem is detected.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Alexander Lakhin
Date:
Subject: Re: Assertion failure in SnapBuildInitialSnapshot()
Next
From: Thomas Munro
Date:
Subject: Re: Keeping track of buildfarm animals' personality