Re: pgbench - use pg logging capabilities
Michael Paquier <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.devel.general |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Jan 06, 2020 at 01:36:23PM +0100, Fabien COELHO wrote: >> I think that I would just remove the "debug" variable defined in >> pgbench.c all together, and switch the messages for the duration and the >> one in executeMetaCommand to use info-level logging.. > > Ok, done. Thanks. The output then gets kind of inconsistent when using --debug: pgbench: client 2 executing script "<builtin: TPC-B (sort of)>" client 2 executing \set aid client 2 executing \set bid client 2 executing \set tid client 2 executing \set delta My point was to just modify the code so as this uses pg_log_debug(), with a routine doing some reverse-engineering of the Command data to generate a string to show up in the logs. Sorry for the confusion.. And there is no need to use __pg_log_level either which should remain internal to logging.h IMO. We'd likely want a similar business in syntax_error() to be fully consistent with all other code paths dealing with an error showing up before exiting. No idea what others think here. I may be too much pedantic. -- Michael
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl4UQDoACgkQnvQgOdby QH3QgA/9GI/EpSFHxuSviUpQJkPuVWY4Si2Z2NRT/5oVpFDD4MLHFo02a3sxiWcZ 1NM4zUdTTMGzmDwRQZRamdYXyFbIfYyIX3v595lUS+O98owCsv2vXEK1wvhkKwcg x5e5pnyAhyV8aQPhDtMSCDvwa6QhtL83FJZZkURseqgbj6ayGad+BQ3AL7xeVzxO YpUfULHgu1BSxgVOeWfMyrOt1pk0xFM2oPrstQBGooky7TKHKyp3my1wBhLh12Ou 9x3yr/XQE8KMhuK27xqkQFLjjkp88zOdX4XOv56CENQFYr85XfggdpYXMszTdgQ/ 1au0bM7OvI/Om1+vuQyDyukAp0Nr7iKl041wyit57YVIyJnyrZxnbSECMB7yTv/P aXOP856NPn9xgWGfxWlKU+T8KT7vK6NUZWkbk/VgQdIpOcol54qNTYIZGy+je2rp gR0KjKhiwCcLOMjEGf1lLjMtgGzHD+FVojOtWbMw7rsBUqB9i9mxSaoTeYmFHeR8 8+f8ZQ+GmiuxfBQrM3f6f/IBCnXFuCzjLdJpZ7MA8hiKAyyLh+amVv35QlL3bvWP u4zDnaf0ZWHXrtvNOGhYxoMZSreGILtJDkPrR7i9oVATJx3MEqqXlittcN6e+ViW AIX90I3jlDwX/TY7d7OAeLAMt8IXvmf9UvRCz+9zcxdzEb0h9hQ= =yEmk -----END PGP SIGNATURE-----