Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
dbf53e63
Commit
dbf53e63
authored
Dec 31, 2005
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename variable to cmd_str.
parent
ba3e1cb8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
src/backend/postmaster/pgstat.c
src/backend/postmaster/pgstat.c
+8
-8
src/include/pgstat.h
src/include/pgstat.h
+2
-2
No files found.
src/backend/postmaster/pgstat.c
View file @
dbf53e63
...
...
@@ -13,7 +13,7 @@
*
* Copyright (c) 2001-2005, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.11
4 2005/12/31 17:46:19
momjian Exp $
* $PostgreSQL: pgsql/src/backend/postmaster/pgstat.c,v 1.11
5 2005/12/31 19:39:10
momjian Exp $
* ----------
*/
#include "postgres.h"
...
...
@@ -777,7 +777,7 @@ pgstat_beshutdown_hook(int code, Datum arg)
* ----------
*/
void
pgstat_report_activity
(
const
char
*
stat_msg
)
pgstat_report_activity
(
const
char
*
cmd_str
)
{
PgStat_MsgActivity
msg
;
int
len
;
...
...
@@ -785,12 +785,12 @@ pgstat_report_activity(const char *stat_msg)
if
(
!
pgstat_collect_querystring
||
pgStatSock
<
0
)
return
;
len
=
strlen
(
stat_msg
);
len
=
pg_mbcliplen
(
stat_msg
,
len
,
PGSTAT_ACTIVITY_SIZE
-
1
);
len
=
strlen
(
cmd_str
);
len
=
pg_mbcliplen
(
cmd_str
,
len
,
PGSTAT_ACTIVITY_SIZE
-
1
);
memcpy
(
msg
.
m_
stat_msg
,
stat_msg
,
len
);
msg
.
m_
stat_msg
[
len
]
=
'\0'
;
len
+=
offsetof
(
PgStat_MsgActivity
,
m_
stat_msg
)
+
1
;
memcpy
(
msg
.
m_
cmd_str
,
cmd_str
,
len
);
msg
.
m_
cmd_str
[
len
]
=
'\0'
;
len
+=
offsetof
(
PgStat_MsgActivity
,
m_
cmd_str
)
+
1
;
pgstat_setheader
(
&
msg
.
m_hdr
,
PGSTAT_MTYPE_ACTIVITY
);
pgstat_send
(
&
msg
,
len
);
...
...
@@ -3015,7 +3015,7 @@ pgstat_recv_activity(PgStat_MsgActivity *msg, int len)
entry
=
&
(
pgStatBeTable
[
msg
->
m_hdr
.
m_backendid
-
1
]);
StrNCpy
(
entry
->
activity
,
msg
->
m_
stat_msg
,
PGSTAT_ACTIVITY_SIZE
);
StrNCpy
(
entry
->
activity
,
msg
->
m_
cmd_str
,
PGSTAT_ACTIVITY_SIZE
);
entry
->
activity_start_timestamp
=
GetCurrentTimestamp
();
}
...
...
src/include/pgstat.h
View file @
dbf53e63
...
...
@@ -5,7 +5,7 @@
*
* Copyright (c) 2001-2005, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/include/pgstat.h,v 1.
39 2005/12/31 17:46:19
momjian Exp $
* $PostgreSQL: pgsql/src/include/pgstat.h,v 1.
40 2005/12/31 19:39:11
momjian Exp $
* ----------
*/
#ifndef PGSTAT_H
...
...
@@ -179,7 +179,7 @@ typedef struct PgStat_MsgAnalyze
typedef
struct
PgStat_MsgActivity
{
PgStat_MsgHdr
m_hdr
;
char
m_
stat_msg
[
PGSTAT_ACTIVITY_SIZE
];
char
m_
cmd_str
[
PGSTAT_ACTIVITY_SIZE
];
}
PgStat_MsgActivity
;
/* ----------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment