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

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: '???? ???????' <ifrol2001(at)mail(dot)ru>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How are files of tables/indexes/etc deleting?
Date: 2016-04-19 13:53:53
Message-ID: A737B7A37273E048B164557ADEF4A58B53841A5B@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2016-04-19 14:10:01 Re: error while installing auto_explain contrib module
Previous Message Jeff Janes 2016-04-19 13:53:01 Re: Vacuum never completed....