Re: Annoying error messages in _dosmaperr

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Annoying error messages in _dosmaperr
Дата
Msg-id 22523.1224086614@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Annoying error messages in _dosmaperr  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Ответы Re: Annoying error messages in _dosmaperr  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Список pgsql-hackers
ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> writes:
> Can we supress this annoying message? It seems to come from _dosmaperr,
> but the error "postmaster.pid is not found" is a *normal* situation
> in pg_resetxlog.

>     -> open("%s/postmaster.pid", O_RDONLY, 0)
>     -> pgwin32_open()
>     -> _dosmaperr()
>         #ifndef FRONTEND
>             ereport(DEBUG5, ...);
>         #else
>             fprintf(stderr, _("mapped win32 error code %lu to %d"), e, errno);
>         #endif

> DEBUG5 means the messages are completely non-critical. Therefore, client
> programs also don't need to report them, no? If possible, I'd like to
> remove the #else block (or all of them) from the above routine.

I suppose ideally we'd have some sort of debug-output switch on the
client side and code the #else branch like this
if (debug >= 5)    fprintf(stderr, ...);

It's probably not worth the trouble to do that, but maybe we could just
have a FRONTEND_DEBUG compile time switch:
       #ifndef FRONTEND           ereport(DEBUG5, ...);       #elif FRONTEND_DEBUG           fprintf(stderr, _("mapped
win32error code %lu to %d"), e, errno);       #endif
 

That would at least leave the code in place if anyone needed the
debugging output badly enough to do a custom build.
        regards, tom lane


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED
Следующее
От: "Joshua Tolley"
Дата:
Сообщение: Re: Cross-column statistics revisited