Skip site navigation (1) Skip section navigation (2)

Re: Remove sort files

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Remove sort files
Date: 2001-05-23 16:33:31
Message-ID: 200105231633.f4NGXVV15395@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > Why don't we put the sort files into /tmp and let the system figure out
> > how to get rid of them?
> 
> Hard-wiring the assumption that they should be in /tmp would be VASTLY
> worse than our current situation.  Lots of people run with /tmp its own,
> not very large partition.  There are also serious security issues on
> machines that don't have directory stickybits.
> 
> I do not like the way Bruce is doing the find, either, but moving stuff
> to /tmp isn't the answer.
> 
> One reasonable idea is
> 
> 	cd pg_sorttemp ; rm -f *
> 
> which could potentially fail if there are LOTS of dead temp files
> (enough to make the expanded rm command overrun your kernel limit on
> command length) but if there are that many then you've got serious
> problems anyway.

OK, here is the new 'find' line:

"find \"%s\"/base -name pg_sorttemp ! -type f -exec /bin/sh -c \"cd {}; rm -f *\" \\;",                                                
    
-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

Responses

pgsql-patches by date

Next:From: Bruce MomjianDate: 2001-05-23 16:34:27
Subject: Re: Remove sort files
Previous:From: Tom LaneDate: 2001-05-23 16:29:54
Subject: Re: Remove sort files

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group