Re: pgbench - use pg logging capabilities

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgbench - use pg logging capabilities
Date: 2019-12-29 11:11:03
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Dec 24, 2019 at 11:17:31AM +0100, Fabien COELHO wrote:
> Some printing to stderr remain for some pgbench specific output.

Hmm. Wouldn't it make sense to output the log generated as
information from the test using pg_log_info() instead of using
fprintf(stderr) (the logs of the initial data load, progress report)?
It seems to me that this would be consistent with the other tools we
have, and being able to make a difference with the level of logs is
kind of a nice property of logging.c as you can grep easily for one
problems instead of looking at multiple patterns matching an error in
the logs. Note also an error in the scripts does not report an
error. Another thing is that messages logged would need to be
translated. I think that's nice, but perhaps others don't like that
or may think that's not a good idea. Who knows..

> The patch fixes a inconsistent test case name that I noticed in passing.
> @@ -157,7 +157,7 @@ my @options = (
> qr{error while setting random seed from --random-seed option}
> ]
> ],
> - [ 'bad partition type', '-i --partition-method=BAD', [qr{"range"}, qr{"hash"}, qr{"BAD"}] ],
> + [ 'bad partition method', '-i --partition-method=BAD', [qr{"range"}, qr{"hash"}, qr{"BAD"}] ],
> [ 'bad partition number', '-i --partitions -1', [ qr{invalid number of partitions: "-1"} ] ],

No problem with this one from me, I'll fix it if there are no

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2019-12-29 11:24:04 Re: Incremental View Maintenance: ERROR: out of shared memory
Previous Message Peter Eisentraut 2019-12-29 10:33:34 remove some STATUS_* symbols