Fix "pg_bench -C -M prepared".
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 17 Mar 2016 03:18:07 +0000 (23:18 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 17 Mar 2016 03:18:07 +0000 (23:18 -0400)
commit47211af17a2dbee38b53b2ea6de81499dbb2c7f5
treea7d344633833c0c327081daa8d26a8a9ab4a5e53
parent5db51464311eb7fe4e90030c6a514ff61e9f1c00
Fix "pg_bench -C -M prepared".

This didn't work because when we dropped and re-established a database
connection, we did not bother to reset session-specific state such as
the statements-are-prepared flags.

The st->prepared[] array certainly needs to be flushed, and I cleared a
couple of other fields as well that couldn't possibly retain meaningful
state for a new connection.

In passing, fix some bogus comments and strange field order choices.

Per report from Robins Tharakan.
src/bin/pgbench/pgbench.c