Re: Remove sort files

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Remove sort files
Date: 2001-05-23 19:57:47
Message-ID: 17184.990647867@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> What about CLUSTER? If we do DROP COLUMN by creating a new heap, we
> will use it then too, right? Are those the only two that create new
> files that could be orphaned?

It's not practical to detect files that are orphaned in that sense:
you couldn't do it without scanning pg_class, which the postmaster is
unprepared to do. Far more important, trying to clean up such files
automatically is a HORRIBLY bad idea. If anything goes wrong, the thing
will probably delete your entire database (for example: because pg_log
lossage causes it to believe all pg_class tuples are uncommitted).
That's a loose cannon I do not wish to have on our decks.

Auto-deletion of sorttemp files is a safe endeavor because (a) you can
reliably tell which ones those are by name, and (b) there's no
possibility that you wanted the data in them. Neither condition holds
for data files.

regards, tom lane

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2001-05-23 20:10:42 Re: Remove sort files
Previous Message Bruce Momjian 2001-05-23 19:46:34 Re: Remove sort files