]> 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)
commit8ee2e5f78cd7f99d41ddf2c396d83adb6f9df2db
tree90f97ddc3cfa429ff020dd05f2abe5de030dbc13
parent3f14d8d59457f98b8ddbbc29cffae9260037aad5
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