Re: drop table but file still exists

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Luca Ferrari <fluca1978(at)infinito(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: drop table but file still exists
Date: 2009-05-15 14:14:01
Message-ID: 2727.1242396841@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Luca Ferrari <fluca1978(at)infinito(dot)it> writes:
> I'm just curious to know why after a drop table the disk file is emptied but
> still existent. What is the reason why the file is not deleted immediately?

It's protecting against some obscure race condition involving
reassignment of the relfilenode number to a new table. I forget the
details but you could troll the archives for it if you really care
--- I think we put that in about two or so years ago.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Simon Riggs 2009-05-15 14:17:54 Re: drop table but file still exists
Previous Message Alban Hertroys 2009-05-15 09:12:55 Re: how do you get there from here?