Re: pg_archivecleanup debug message consistency

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_archivecleanup debug message consistency
Дата
Msg-id 16510.1282492445@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pg_archivecleanup debug message consistency  ("Erik Rijkers" <er@xs4all.nl>)
Ответы Re: pg_archivecleanup debug message consistency  ("Erik Rijkers" <er@xs4all.nl>)
Список pgsql-hackers
"Erik Rijkers" <er@xs4all.nl> writes:
> If only for consistency, this patch adds the path info to that message.

Seems reasonable, but speaking of consistency:

> +#ifdef WIN32
> +                snprintf(WALFilePath, MAXPGPATH, "%s\\%s", archiveLocation, exclusiveCleanupFileName);
> +#else
> +                snprintf(WALFilePath, MAXPGPATH, "%s/%s", archiveLocation, exclusiveCleanupFileName);
> +#endif

I see that you copied-and-pasted this pattern from somewhere else in
pg_archivecleanup.c, but I'd like to argue that it's out of place there
too.  We don't go out of our way to show Windows paths with backslashes
anywhere in the core code, so why is pg_archivecleanup doing it?  I
think we should just drop the ifdef and do %s/%s always.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: More vacuum stats
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Replacing the pg_get_expr security hack with a datatype solution