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: 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 20:10:42
Message-ID: 17261.990648642@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:
> OK, here is the new code:

> snprintf(clear_pg_sorttemp, sizeof(clear_pg_sorttemp),
> "sh -c '\
> cd \"%s\"/base && \
> ls | while read DIR; \
> do \
> export DIR; \
> (cd \"$DIR\"/pg_sorttemp/ 2>/dev/null && rm -f *); \
> done'",
> DataDir);

A readdir() loop would be hardly any longer, and it'd be faster and more
secure. Among other problems with the above code, we do not prohibit
double-quote in database paths anymore ...

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Ned Wolpert 2001-05-23 20:15:17 RE: ANT fix for jar creation
Previous Message Tom Lane 2001-05-23 19:57:47 Re: Remove sort files