|
13 | 13 | * |
14 | 14 | * Copyright (c) 2001-2005, PostgreSQL Global Development Group |
15 | 15 | * |
16 | | - * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.113 2005/12/16 04:03:40 tgl Exp $ |
| 16 | + * $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.114 2005/12/31 17:46:19 momjian Exp $ |
17 | 17 | * ---------- |
18 | 18 | */ |
19 | 19 | #include "postgres.h" |
@@ -777,20 +777,20 @@ pgstat_beshutdown_hook(int code, Datum arg) |
777 | 777 | * ---------- |
778 | 778 | */ |
779 | 779 | void |
780 | | -pgstat_report_activity(const char *what) |
| 780 | +pgstat_report_activity(const char *stat_msg) |
781 | 781 | { |
782 | 782 | PgStat_MsgActivity msg; |
783 | 783 | int len; |
784 | 784 |
|
785 | 785 | if (!pgstat_collect_querystring || pgStatSock < 0) |
786 | 786 | return; |
787 | 787 |
|
788 | | - len = strlen(what); |
789 | | - len = pg_mbcliplen(what, len, PGSTAT_ACTIVITY_SIZE - 1); |
| 788 | + len = strlen(stat_msg); |
| 789 | + len = pg_mbcliplen(stat_msg, len, PGSTAT_ACTIVITY_SIZE - 1); |
790 | 790 |
|
791 | | - memcpy(msg.m_what, what, len); |
792 | | - msg.m_what[len] = '\0'; |
793 | | - len += offsetof(PgStat_MsgActivity, m_what) +1; |
| 791 | + memcpy(msg.m_stat_msg, stat_msg, len); |
| 792 | + msg.m_stat_msg[len] = '\0'; |
| 793 | + len += offsetof(PgStat_MsgActivity, m_stat_msg) +1; |
794 | 794 |
|
795 | 795 | pgstat_setheader(&msg.m_hdr, PGSTAT_MTYPE_ACTIVITY); |
796 | 796 | pgstat_send(&msg, len); |
@@ -3015,7 +3015,7 @@ pgstat_recv_activity(PgStat_MsgActivity *msg, int len) |
3015 | 3015 |
|
3016 | 3016 | entry = &(pgStatBeTable[msg->m_hdr.m_backendid - 1]); |
3017 | 3017 |
|
3018 | | - StrNCpy(entry->activity, msg->m_what, PGSTAT_ACTIVITY_SIZE); |
| 3018 | + StrNCpy(entry->activity, msg->m_stat_msg, PGSTAT_ACTIVITY_SIZE); |
3019 | 3019 |
|
3020 | 3020 | entry->activity_start_timestamp = GetCurrentTimestamp(); |
3021 | 3021 | } |
|
0 commit comments