On Tue, Dec 9, 2025 at 2:25 PM Andres Freund <[email protected]> wrote: > > Isn't the whole idea that it would be safe to allow freezing in this case > incorrect? Consider the following scenario: > > A1: BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ; SELECT; > B1: CREATE TABLE foo AS SELECT random(); > B2: VACUUM FREEZE foo; > A2: SELECT * FROM foo; > > If you allowed freezing of the rows in B2, A2 will see the rows as visible, > despite them not being supposed to be visible.
Is the reason this isn't a problem for COPY FREEZE because the freezing happens in the same transaction block as creating the table so A2 wouldn't be able to see the catalog entry for the table? - Melanie
