We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 890a999 commit beef895Copy full SHA for beef895
src/backend/postmaster/pgstat.c
@@ -2490,7 +2490,7 @@ pgstat_report_activity(BackendState state, const char *cmd_str)
2490
volatile PgBackendStatus *beentry = MyBEEntry;
2491
TimestampTz start_timestamp;
2492
TimestampTz current_timestamp;
2493
- int len;
+ int len = 0;
2494
2495
TRACE_POSTGRESQL_STATEMENT_STATUS(cmd_str);
2496
@@ -2524,8 +2524,8 @@ pgstat_report_activity(BackendState state, const char *cmd_str)
2524
start_timestamp = GetCurrentStatementStartTimestamp();
2525
if (cmd_str != NULL)
2526
{
2527
- len = strlen(cmd_str);
2528
- len = pg_mbcliplen(cmd_str, len, pgstat_track_activity_query_size - 1);
+ len = pg_mbcliplen(cmd_str, strlen(cmd_str),
+ pgstat_track_activity_query_size - 1);
2529
}
2530
2531
/*
0 commit comments