Re: does refreshing materialized view make the database bloat?

Поиск
Список
Период
Сортировка
От Peter J. Holzer
Тема Re: does refreshing materialized view make the database bloat?
Дата
Msg-id 20230114085133.7yzay2whq566lzds@hjp.at
обсуждение исходный текст
Ответ на does refreshing materialized view make the database bloat?  (jian he <jian.universality@gmail.com>)
Список pgsql-general
On 2023-01-14 11:34:13 +0530, jian he wrote:
>     Once we have the diff table, we perform set-based DELETE and INSERT
>     operations against the materialized view, and discard both temporary
>     tables.
>
>
> Here the temporary tables are "discard" meaning the temporary tables are
> deleted and the temporary tables' spaces are reclaimed immediately?
> Or the temporary tables are deleted and the spaces will be reclaimed by another
> mechanism? 

Tables are implemented as files by PostgreSQL. When a table is dropped,
the file is deleted[1]. Whether that means that the space is
"immediately" available again is up to the operating system.

        hp

[1] Possibly delayed until commit.

--
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Вложения

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: does refreshing materialized view make the database bloat?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Why is a hash join preferred when it does not fit in work_mem