signed logging format for pid in log_line_prefix?

From: Greg Stark <stark(at)mit(dot)edu>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: signed logging format for pid in log_line_prefix?
Date: 2017-09-01 15:04:14
Message-ID: CAM-w4HMCj9FD5hOB+mMb=9Ke1vstCcTwAYLKAo24e2P_ChGCXQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-09-01 15:09:55 Missing SIZE_MAX
Previous Message Alvaro Herrera 2017-09-01 15:03:43 Re: More replication race conditions