On Fri, 25 Sept 2026 at 20:50, Sami Imseih <[email protected]> wrote: > > Hi, > > > I realise REPACK (CONCURRENTLY) is documented as not being MVCC-safe, > > Should this at least be documented on the pg_dump page, or could [...] > > Yeah, this is expected and not specifically introduced by REPACK. Any > command that rewrites the table will also store the rows with a new > xmin, so these rows are now not visible to a transaction that has a > snapshot that pre-dates the rewrite. pg_dump runs in REPEATABLE READ > isolation level and has a transaction snapshot, so it will not see the > rewritten rows. A query inside a STABLE/IMMUTABLE function even when run > through a READ COMMITTED transaction will also have the same behavior. > > You can repro the same behavior with an ALTER TABLE...ALTER COLUMN:
Ah, of course, I guess I was so focused on finding data loss that I neglected to consider the pre-existing gaps. Thanks for pointing that out. Thom
