Re: Remove sort files
От | Bruce Momjian |
---|---|
Тема | Re: Remove sort files |
Дата | |
Msg-id | 200105231533.f4NFXmx08116@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: Remove sort files (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: Remove sort files
|
Список | pgsql-patches |
> Bruce Momjian writes: > > > The only unusual part is the use of system("find...rm...") to remove the > > files in pg_sorttemp. Seemed cleaner than doing fancy directory > > walking code in C. > > 'find' is not in the portable subset of shell utilities, AFAIK. If you do > put them into a separate directory you could use "rm -rf %s" on that > directory. I did it that way so if pg_sorttemp is a symlink, I don't remove the symlink, just the files inside. The 'find' needs to be updated though to '! -file f' rather than '-type d' because it will not see symlinks, and I am not sure the find symlink find flag is portable. Anyway, I am still thinking about this. I haven't addressed tables that are orphaned by a rename aborting. I am no where near ready to apply this yet. > > Why don't we put the sort files into /tmp and let the system figure out > how to get rid of them? I am concerned that /tmp has size limitations that /data doesn't. I know on my BSD/OS, it limits to 75MB because it is a memory-based file system. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
В списке pgsql-patches по дате отправления: