From: | Tomas Vondra <tomas(at)vondra(dot)me> |
---|---|
To: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: logical replication: restart_lsn can go backwards (and more), seems broken since 9.4 |
Date: | 2024-11-19 21:36:08 |
Message-ID: | 40c4b5c3-2592-4e29-80ae-684d9cc8bfde@vondra.me |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
OK,
Now that the fix is committed, shall we introduce some of the asserts? I
believe there's an agreement the restart_lsn shouldn't move backwards,
so I propose the attached patch.
I still think not resetting the fields when releasing the slot, and
allowing the values to move backwards is rather suspicious. But I don't
have any reproducer demonstrating an issue (beyond just hitting an
assert). Perhaps it's correct, but in that case it'd be good to add a
comment explaining why that's the case. Sadly, it has to be written by
someone else - I've been unable to form a justification why it's OK :-(
regards
--
Tomas Vondra
Attachment | Content-Type | Size |
---|---|---|
0001-asserts-restart_lsn.patch | text/x-patch | 1.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2024-11-19 21:42:20 | Re: Update Unicode data to Unicode 16.0.0 |
Previous Message | Jeff Davis | 2024-11-19 21:32:47 | Re: Collation & ctype method table, and extension hooks |