Re: Remove sort files

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Remove sort files
Дата
Msg-id 17261.990648642@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Remove sort files  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Remove sort files
Список pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.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

В списке pgsql-patches по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Remove sort files
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Remove sort files