From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: pgbench: cleanup use of a "logfile" parameter |
Date: | 2016-02-12 20:31:50 |
Message-ID: | E1aUKNa-0001I8-Og@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
pgbench: cleanup use of a "logfile" parameter
There is no reason to have the per-thread logfile file pointer as a
separate parameter in various functions: it's much simpler to put it in
the per-thread state struct instead, which is already being passed to
all functions that need the log file anyway. Change the callsites in
which it was used as a boolean to test whether logging is active, so
that they use the use_log global variable instead.
No backpatch, even though this exists since commit a887c486d5df of March
2010, because this is just for cleanliness' sake and the surrounding
code has been modified a lot recently anyway.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/34f13cc48432fb0a70bd76116347a758b7a0bc63
Modified Files
--------------
src/bin/pgbench/pgbench.c | 44 +++++++++++++++++++++++++-------------------
1 file changed, 25 insertions(+), 19 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-02-12 21:59:14 | Re: Re: [COMMITTERS] pgsql: Add some isolation tests for deadlock detection and resolution. |
Previous Message | Alvaro Herrera | 2016-02-12 20:15:41 | pgsql: pgbench: fix segfault with empty sql file |