|
13 | 13 | *
|
14 | 14 | *Copyright (c) 2001-2005, PostgreSQL Global Development Group
|
15 | 15 | *
|
16 |
| - *$PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.114 2005/12/3117:46:19 momjian Exp $ |
| 16 | + *$PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.115 2005/12/3119:39:10 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(constchar*stat_msg) |
| 780 | +pgstat_report_activity(constchar*cmd_str) |
781 | 781 | {
|
782 | 782 | PgStat_MsgActivitymsg;
|
783 | 783 | intlen;
|
784 | 784 |
|
785 | 785 | if (!pgstat_collect_querystring||pgStatSock<0)
|
786 | 786 | return;
|
787 | 787 |
|
788 |
| -len=strlen(stat_msg); |
789 |
| -len=pg_mbcliplen(stat_msg,len,PGSTAT_ACTIVITY_SIZE-1); |
| 788 | +len=strlen(cmd_str); |
| 789 | +len=pg_mbcliplen(cmd_str,len,PGSTAT_ACTIVITY_SIZE-1); |
790 | 790 |
|
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; |
| 791 | +memcpy(msg.m_cmd_str,cmd_str,len); |
| 792 | +msg.m_cmd_str[len]='\0'; |
| 793 | +len+= offsetof(PgStat_MsgActivity,m_cmd_str)+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_stat_msg,PGSTAT_ACTIVITY_SIZE); |
| 3018 | +StrNCpy(entry->activity,msg->m_cmd_str,PGSTAT_ACTIVITY_SIZE); |
3019 | 3019 |
|
3020 | 3020 | entry->activity_start_timestamp=GetCurrentTimestamp();
|
3021 | 3021 | }
|
|