Re: logical: fix recomputation required LSN on restart_lsn-only advancement
Álvaro Herrera <alvherre@kurilemu.de>
From: Álvaro Herrera <alvherre@kurilemu.de>
To: Chao Li <li.evan.chao@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-05-29T22:16:02Z
Lists: pgsql-hackers
On 2026-Apr-21, Chao Li wrote: > While reading logical replication code, I found an issue in > LogicalConfirmReceivedLocation(). > > In LogicalConfirmReceivedLocation(), updated_restart is tracked > independently from updated_xmin, and the slot is marked dirty and > saved when either one changed. But after that, > ReplicationSlotsComputeRequiredLSN() is still only called inside "if > (updated_xmin)”. Have you seen this causing issues in any cases beyond REPACK? I'm wondering about your suggestion to backpatch this change: > Looks like this issue has been there for a long time, so if this > analysis is correct, it may also be worth back-patching. If REPACK is the only affected party, then we don't need to care; as Antonin said, the xmin advances frequently enough in other cases, so it shouldn't normally be a problem ... -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/