Обсуждение: How are files of tables/indexes/etc deleting?

Поиск
Список
Период
Сортировка

How are files of tables/indexes/etc deleting?

От
Иван Фролков
Дата:

When I drop a table, the file which contains real data will be deleted, but only when I will commit transaction. It seems like such job must do vacuum, but I cannot locate the code which does the real job. Could anybody explain in details how it works?

Re: How are files of tables/indexes/etc deleting?

От
Albe Laurenz
Дата:
Иван Фролков wrote:
> When I drop a table, the file which contains real data will be deleted, but only when I will commit
> transaction. It seems like such job must do vacuum, but I cannot locate the code which does the real
> job. Could anybody explain in details how it works?

See RelationDropStorage() in src/backend/catalog/storage.c

No vacuum is necessary, the files that belong to the relation are deleted at commit time.

Yours,
Laurenz Albe