[PATCH] pgbench: Remove ecnt, a member variable of CState
Hi.
I created a patch to remove ecnt which is a member variable of CState.
This variable is incremented in some places, but it's not used for any
purpose.
Also, the current pgbench's client abandons processing after hitting
error, so this variable is no need, I think.
Regards
--
Kota Miyake
Attachments:
remove_ecnt.patchtext/x-diff; name=remove_ecnt.patchDownload
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index 627a244fb7..31a4df45f5 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -427,7 +427,6 @@ typedef struct
/* per client collected stats */
int64 cnt; /* client transaction count, for -t */
- int ecnt; /* error count */
} CState;
/*
@@ -2716,7 +2715,6 @@ sendCommand(CState *st, Command *command)
if (r == 0)
{
pg_log_debug("client %d could not send %s", st->id, command->argv[0]);
- st->ecnt++;
return false;
}
else
@@ -2828,14 +2826,12 @@ readCommandResponse(CState *st, MetaCommand meta, char *varprefix)
if (qrynum == 0)
{
pg_log_error("client %d command %d: no results", st->id, st->command);
- st->ecnt++;
return false;
}
return true;
error:
- st->ecnt++;
PQclear(res);
PQclear(next_res);
do
On Fri, Feb 26, 2021 at 05:39:31PM +0900, miyake_kouta wrote:
Also, the current pgbench's client abandons processing after hitting error,
so this variable is no need, I think.
Agreed. Its last use was in 12788ae, as far as I can see. So let's
just cleanup that.
--
Michael
On 2021-Feb-26, Michael Paquier wrote:
On Fri, Feb 26, 2021 at 05:39:31PM +0900, miyake_kouta wrote:
Also, the current pgbench's client abandons processing after hitting error,
so this variable is no need, I think.Agreed. Its last use was in 12788ae, as far as I can see. So let's
just cleanup that.
+1
--
�lvaro Herrera Valdivia, Chile
On Fri, Feb 26, 2021 at 04:36:41PM -0300, Alvaro Herrera wrote:
+1
Thanks, done.
--
Michael