Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdbf53e6

Browse files
committed
Rename variable to cmd_str.
1 parentba3e1cb commitdbf53e6

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

‎src/backend/postmaster/pgstat.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
*Copyright (c) 2001-2005, PostgreSQL Global Development Group
1515
*
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 $
1717
* ----------
1818
*/
1919
#include"postgres.h"
@@ -777,20 +777,20 @@ pgstat_beshutdown_hook(int code, Datum arg)
777777
* ----------
778778
*/
779779
void
780-
pgstat_report_activity(constchar*stat_msg)
780+
pgstat_report_activity(constchar*cmd_str)
781781
{
782782
PgStat_MsgActivitymsg;
783783
intlen;
784784

785785
if (!pgstat_collect_querystring||pgStatSock<0)
786786
return;
787787

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);
790790

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;
794794

795795
pgstat_setheader(&msg.m_hdr,PGSTAT_MTYPE_ACTIVITY);
796796
pgstat_send(&msg,len);
@@ -3015,7 +3015,7 @@ pgstat_recv_activity(PgStat_MsgActivity *msg, int len)
30153015

30163016
entry=&(pgStatBeTable[msg->m_hdr.m_backendid-1]);
30173017

3018-
StrNCpy(entry->activity,msg->m_stat_msg,PGSTAT_ACTIVITY_SIZE);
3018+
StrNCpy(entry->activity,msg->m_cmd_str,PGSTAT_ACTIVITY_SIZE);
30193019

30203020
entry->activity_start_timestamp=GetCurrentTimestamp();
30213021
}

‎src/include/pgstat.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
*Copyright (c) 2001-2005, PostgreSQL Global Development Group
77
*
8-
*$PostgreSQL: pgsql/src/include/pgstat.h,v 1.39 2005/12/3117:46:19 momjian Exp $
8+
*$PostgreSQL: pgsql/src/include/pgstat.h,v 1.40 2005/12/3119:39:11 momjian Exp $
99
* ----------
1010
*/
1111
#ifndefPGSTAT_H
@@ -179,7 +179,7 @@ typedef struct PgStat_MsgAnalyze
179179
typedefstructPgStat_MsgActivity
180180
{
181181
PgStat_MsgHdrm_hdr;
182-
charm_stat_msg[PGSTAT_ACTIVITY_SIZE];
182+
charm_cmd_str[PGSTAT_ACTIVITY_SIZE];
183183
}PgStat_MsgActivity;
184184

185185
/* ----------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp