Re: [PATCH] VACUUM: avoid pre-creation transactions holding back cleanup of newly created relations

Поиск
Список
Период
Сортировка
От Melanie Plageman
Тема Re: [PATCH] VACUUM: avoid pre-creation transactions holding back cleanup of newly created relations
Дата
Msg-id CAAKRu_YqAgs8A5-TcKcGU1XsRE3ZC5VGmgF3YZuvQgq5V_fBZQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] VACUUM: avoid pre-creation transactions holding back cleanup of newly created relations  (Andres Freund <andres@anarazel.de>)
Ответы Re: [PATCH] VACUUM: avoid pre-creation transactions holding back cleanup of newly created relations
Список pgsql-hackers
On Tue, Dec 9, 2025 at 2:25 PM Andres Freund <andres@anarazel.de> 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



В списке pgsql-hackers по дате отправления: