On Sun, 9 Nov 2025 at 19:02, Mihail Nikalayeu <[email protected]> wrote: > > Hello! > > This is a rebased version. > > Also I decided to keep only part 3 for now, because we need some > common solution to keep the horizon advance for both INDEX and REPACK > operations [0].
I'm not sure a complete and common approach is that easy between CIC and REPACK CONCURRENTLY. Specifically, indexes don't need to deal with the exact visibility info of a tuple, and can let VACUUM take care of any false positives (now-dead tuples), while REPACK does need to deal with all of that that (xmin/xmax/xcid). Considering that REPACK is still going to rely on primitives provided by logical replication, it would be not much different from reducing the lifetime of the snapshots used by Logical Replication's initial sync, and I'd rather not have to wait for that to get implemented. The only thing I can think of that might be shareable between the two is the tooling in heapscan to every so often call into a function that registers a new snapshot, but I think that's a comparatively minor change on top of what was implemented for CIC, one that REPACK can deal with on its own. Kind regards, Matthias van de Meent Databricks (https://www.databricks.com)
