> I think it would be good to do it in pgbench, provided it can be done
> fairly cleanly.
>
> Presumably we would want to repeat all of the ordinary commands, in the
> file, but not any of the backslash set commands that precede any ordinary
> commands. But what if backslash set commands are sprinkled between
> ordinary commands?
As I have spent some time in pgbench recently, ISTM that when restarting
the transaction (reset state = 0), you want to keep track of the farthest
state that was reached on previous attempts, so as to skip backslash
commands for those states, and restart execute them where they were left.
That would mean one integer for this purpose in the client structure.
--
Fabien