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

Commit2ed391f

Browse files
committed
Fix pgbench options -C and -R together
The bug is that prior to --rate doCustom was always disconnect/reconnectwithout exiting, but with rate it returns if it has to wait. However threadRuntest whether there is a connection before recalling doCustom, so it was nevercalled.Bug is not existed in head branch because of refactoring at12788ae, patch only 9.6Author: Fabien CoelhoReviewed-by: mehttps://commitfest.postgresql.org/13/970/
1 parent8de6278 commit2ed391f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎src/bin/pgbench/pgbench.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1967,7 +1967,6 @@ doCustom(TState *thread, CState *st, StatsData *agg)
19671967
st->listen= false;
19681968
st->sleeping= false;
19691969
st->throttling= false;
1970-
st->is_throttled= false;
19711970
memset(st->prepared,0,sizeof(st->prepared));
19721971
}
19731972

@@ -4345,6 +4344,12 @@ threadRun(void *arg)
43454344
remains--;/* I've aborted */
43464345
}
43474346
}
4347+
elseif (is_connect&&st->sleeping)
4348+
{
4349+
/* it is sleeping for throttling, maybe it is done, let us try */
4350+
if (!doCustom(thread,st,&aggs))
4351+
remains--;
4352+
}
43484353

43494354
if (st->ecnt>prev_ecnt&&commands[st->state]->type==META_COMMAND)
43504355
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp