When initializing a large database, pgbench writes tons of "%d tuples done" lines. I propose to change this to a sort of progress counter that stays on the same line, as in the attached patch.
diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c index 00cab73..b5f3054 100644 --- a/contrib/pgbench/pgbench.c +++ b/contrib/pgbench/pgbench.c @@ -1420,8 +1420,9 @@ } if (j % 100000 == 0) - fprintf(stderr, "%d tuples done.\n", j); + fprintf(stderr, "%d of %d tuples done.\r", j, naccounts * scale); } + fprintf(stderr, "\n"); if (PQputline(con, "\\.\n")) { fprintf(stderr, "very last PQputline failed\n");
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers