forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3bac77c
committed
Rework the pgbench state machine code for clarity
This commit continues the code improvements started by commit12788ae. With this commit, state machine transitions are bettercontained in the routine that was called doCustom() and is now calledadvanceConnectionState -- the resulting code is easier to reason about,since there are no state changes occuring in the outer layer.This change is prompted by future patches to add more features topgbench, which will need to effect some more surgery to this code.Fabien's original had all the machine state changes inside one routine,but I (Álvaro) thought that a subroutine to handle command execution ismore straightforward to review, so this commit does not match Fabien'ssubmission closely. If something is broken, it's probably my fault.Author: Fabien Coelho, Álvaro HerreraReviewed-by: Kirk JamisonDiscussion:https://postgr.es/m/alpine.DEB.2.21.1808111104320.1705@lancre1 parent03e10b9 commit3bac77c
1 file changed
+351
-372
lines changed0 commit comments
Comments
(0)