How are files of tables/indexes/etc deleting?

Started by Иван Фролковalmost 10 years ago2 messagesgeneral
Jump to latest
#1Иван Фролков
ifrol2001@mail.ru

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?

#2Laurenz Albe
laurenz.albe@cybertec.at
In reply to: Иван Фролков (#1)
Re: How are files of tables/indexes/etc deleting?

Иван Фролков 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

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general