Re: [HACKERS] signed logging format for pid in log_line_prefix?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] signed logging format for pid in log_line_prefix?
Дата
Msg-id 20433.1504285374@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] signed logging format for pid in log_line_prefix?  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> I wonder if we could just adopt pid_t for PIDs.

We could (if somebody is willing to find and change all the relevant
declarations).  But that doesn't do anything at all to clarify which
printf format code to use for them.

Note that the POSIX snippet you quote doesn't actually guarantee that
pid_t is not wider than "long".  So while we could convert all these
places toprintf("...%ld...", (long) pid_t_variable_here);
that's still not formally correct.

Since we have yet to see a platform where our current habit of casting
pids to int doesn't work just as well, I'm inclined not to bother
changing anything here.
        regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] [PATCH] Document the order of changing certain settingswhen using hot-standby servers
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] GnuTLS support