Skip to content

Commit ba3e1cb

Browse files
committed
Rename variable 'what' to 'stat_msg'.
1 parent 206499d commit ba3e1cb

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.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 $
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(const char *what)
780+
pgstat_report_activity(const char *stat_msg)
781781
{
782782
PgStat_MsgActivity msg;
783783
int len;
784784

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

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

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;
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_what, PGSTAT_ACTIVITY_SIZE);
3018+
StrNCpy(entry->activity, msg->m_stat_msg, 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.38 2005/10/15 02:49:41 momjian Exp $
8+
* $PostgreSQL: pgsql/src/include/pgstat.h,v 1.39 2005/12/31 17:46:19 momjian Exp $
99
* ----------
1010
*/
1111
#ifndef PGSTAT_H
@@ -179,7 +179,7 @@ typedef struct PgStat_MsgAnalyze
179179
typedef struct PgStat_MsgActivity
180180
{
181181
PgStat_MsgHdr m_hdr;
182-
char m_what[PGSTAT_ACTIVITY_SIZE];
182+
char m_stat_msg[PGSTAT_ACTIVITY_SIZE];
183183
} PgStat_MsgActivity;
184184

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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy