Re: logical replication: restart_lsn can go backwards (and more), seems broken since 9.4
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Cc: Tomas Vondra <tomas@vondra.me>, Masahiko Sawada <sawada.mshk@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2024-11-14T06:34:11Z
Lists: pgsql-hackers
On Thu, Nov 14, 2024 at 11:45:56AM +0530, Ashutosh Bapat wrote: > Here's a quick and dirty patch which describes the idea. I didn't get > time to implement code to move SnapBuild::restart_lsn if > SnapBuild::start_decoding_at moves forward while building initial > snapshot. I am not sure whether that's necessary either. > > I have added three elogs to see if the logic is working as expected. I > see two of the elogs in patch in the server log when I run tests from > tests/subscription and tests/recovery. But I do not see the third one. > That either means that the situation causing the bug is not covered by > those tests or the fix is not triggered. If you run your reproduction > and still see the crashes please provide the output of those elog > messages along with the rest of the elogs you have added. Forgot the attachment, perhaps? -- Michael
Commits
-
Fix a possibility of logical replication slot's restart_lsn going backwards.
- e5ed873b1b4a 18.0 landed
- 568e78a653ee 17.2 landed
- f353911337cf 16.6 landed
- 91771b3fbbc3 15.10 landed
- 26c4e8968690 14.15 landed
- 15dc1abb17dd 13.18 landed
-
Introduce logical decoding.
- b89e151054a0 9.4.0 cited