summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavan Deolasee2016-03-11 06:43:10 +0000
committerPavan Deolasee2016-10-18 10:00:51 +0000
commit6d1729f9283d1c6532a185b3c586808d5afd2ec2 (patch)
tree484c4be98fdd627f183fbbf0f852841b53d19f6a
parent43ef6270410a6e58fd5efce7df4d37fa0305ead1 (diff)
Explicitly cast pthread_t to int for logging purposes
-rw-r--r--src/gtm/common/elog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gtm/common/elog.c b/src/gtm/common/elog.c
index a08dfd292f..9388130a46 100644
--- a/src/gtm/common/elog.c
+++ b/src/gtm/common/elog.c
@@ -114,10 +114,10 @@ log_line_prefix(StringInfo buf)
* MyProcPid changes. MyStartTime also changes when MyProcPid does, so
* reset the formatted start timestamp too.
*/
- if (log_my_pid != MyThreadID)
+ if (log_my_pid != (int) MyThreadID)
{
log_line_number = 0;
- log_my_pid = MyThreadID;
+ log_my_pid = (int) MyThreadID;
formatted_start_time[0] = '\0';
}
log_line_number++;
@@ -144,7 +144,7 @@ log_line_prefix(StringInfo buf)
switch (Log_line_prefix[i])
{
case 'p':
- appendStringInfo(buf, "%lu", MyThreadID);
+ appendStringInfo(buf, "%u", (int) MyThreadID);
break;
case 'l':
appendStringInfo(buf, "%ld", log_line_number);