]> granicus.if.org Git - postgresql/commit
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)
commitc02aae418527ec6f5178c68e2980e02d36090c42
treee96f2d984884b27ead528c22689c84fa8ff4c71c
parentcfc5357c0810ba76f50244aeb5d6890d8dd3a308
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.
contrib/pgbench/pgbench.c