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

2017-09-01 Thread Tom Lane
Alvaro Herrera 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 act

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

2017-09-01 Thread Alvaro Herrera
Greg Stark wrote: > Both the text and csv logging seem to use %d on for logging the server pid: > > appendStringInfo(buf, "%d", MyProcPid); > > Am I missing something or wouldn't this mean we print pids with large > values as negative numbers? Isn't that strange? Wouldn't we rather use > %u here?

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

2017-09-01 Thread Tom Lane
Greg Stark writes: > Both the text and csv logging seem to use %d on for logging the server pid: > appendStringInfo(buf, "%d", MyProcPid); > Am I missing something or wouldn't this mean we print pids with large > values as negative numbers? Isn't that strange? Wouldn't we rather use > %u here? p

[HACKERS] signed logging format for pid in log_line_prefix?

2017-09-01 Thread Greg Stark
Both the text and csv logging seem to use %d on for logging the server pid: appendStringInfo(buf, "%d", MyProcPid); Am I missing something or wouldn't this mean we print pids with large values as negative numbers? Isn't that strange? Wouldn't we rather use %u here? -- greg -- Sent via pgsql