Re: pgbench - use pg logging capabilities

Michael Paquier <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.general
Message-ID <[email protected]>
On Wed, Jan 01, 2020 at 10:19:52PM +0100, Fabien COELHO wrote:
> Bonjour Michaël, et excellente année 2020 !

Toi aussi!  Bonne année.

>> 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)?
> 
> For the progress report, the reason I decided against is that the lines are
> already long enough with data (for the progress report: tps, latency, etc.),
> and prepending "pgbench info" or equivalent in front of every line does not
> look very useful and make it more likely that actually useful data could be
> pushed out of the terminal width.

Hm.  Okay.  That would limit the patch to only report errors in the
first round of changes, which is fine by me.

> For data load, ISTM that people are used to it like that. Moreover, I do not
> think that the \r recently-added trick can work with the logging stuff, so I
> left it out as well altogether.

It could be possible to create new custom options for logging.c.  We
already have one as of PG_LOG_FLAG_TERSE to make the output of psql
compatible with regression tests and such.  These are just thoughts
about the control of:
- the progname is appended to the error string or not.
- CR/LF as last character.

> Dunno about translation. ISTM that pgbench is mostly not translated, not
> sure why.

Because as a benchmark tool that's not really worth it and its output
is rather technical hence translating it would be more challenging?
Perhaps others more used to translation work could chime in the
discussion?
--
Michael
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl4N8iUACgkQnvQgOdby
QH1OPxAAmKgKpP/aldmMKmLnblAenyV2P0QYjc42p4WirCrr1cFAm5vd9ay7ziJe
rqPGuF6btZ/Zrmm2tvuOzZ4l+SmaPrgt2Q55Y/vYO6WHL+JjbbqhZo33SYqIjoNW
NoBwicd85ldDzaj7Yp54Ve4WKxbJUz5sBtCH8QTDvWs2f8thDj/1wGUTYScOgODf
Oi9f/D0oDdURS1PjN3LbZ23YVvV5x8MFkdO9k4xX9Kn4768PT2rhJG+uvpmOdX/r
VZVXrHOuWlESUW8tAqg5oxBGNAB0ru59sY7g8ZnMqkC/G0z8d9jO+cVNbsmcPbEJ
zAA7czC3ttDE0POpXBSo873SGSJvPh43aA2DFxhrNOwhQSWuqpP3YpJmOh07KAPb
QusJ03ionlgkmWzpZeUxJF5N67xCoM1di18GubfUHe2UzVmu7184KUh6dMYB5HxH
IT30ukkk1SLvpgPETbkw3mdHuSQgEmVPhnxGvn1SxU/ZuoA99LXRsG7JDFPrDZAE
xT3vBB8/sXUrgPME6kOxuGxhzYXJb6+1htZ1GCJgbj4MTfdWyo6hNOmK1v9s5Z2a
qX71PPAc9C831Dhu7znFOTzyk5LRGFZaMi8sFvdAfqKZt0isfbcpD66Cu/iFjNvL
gidavq4t1PGKy8kNRl0CHLs2Gz5zlDPwsI2iaSSmN//tBMdl4CM=
=h+KL
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.