Re: confirmed flush lsn seems to be move backward in certain error cases
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>, vignesh C <vignesh21@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-06-11T19:14:49Z
Lists: 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
Commits
-
Fix an assert in CheckPointReplicationSlots().
- d1ffcc7fa3c5 17.0 landed