Re: pgbench - use pg logging capabilities

Michael Paquier <[email protected]> Fri, 10 Jan 2020 09:06:24 +0900
Newsgroups gmane.comp.db.postgresql.devel.general
Message-ID <[email protected]>
On Thu, Jan 09, 2020 at 10:28:21AM +0100, Fabien COELHO wrote:
> Yep, I thought of it, but I was not very keen on having a malloc/free cycle
> just for one debug message. However under debug this is probably not an
> issue.

Consistency is more important here IMO, so applied.

> Your patch works for me. IT can avoid some level of format interpretation
> overheads by switching to Char/Str functions, see first attachement.

I kept both grouped to avoid any unnecessary churn with the
manipulation of PQExpBufferData.

> The other point is the test on __pg_log_level, see second attached.

May be better to discuss that on a separate thread as that's not only
related to pgbench.
--
Michael
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl4XwAAACgkQnvQgOdby
QH0uwBAAgmEyXMvX0/5I75W6ZBFyTKdUkb6VBCfnLvCc7czMkaKeQeUasp0lgkiV
TDS+1fvAz+SrBpmrQI+eNiH0E4eW66uBIPo+kSWuBwRAkGZxAWOJsacE9wb/DJRu
9ZzsVro2mzv46IoiaZClGdAUJbdMjMztxGP+DzayhFdZaQHZ6VXwpNDme0mGqCZf
h+c88/AUhzuddCvFLVqDH0QhdRoxwBCZ61mO5JFFeVPy5o05JFRE8aF1UbsEjfpo
i1u4SktuoGmQSjSLt/bo8cr0hRm7UJ8nnIBjMXDzox+hjpm+B5Y7IwN21iIxVgGR
qaN7gwDdXbvz7rvwn8eEMzNaUv1cI+HjwaTzcbuFjYd70JX3z4LCV2BsrWEPPqxt
470DYjK01l0EuAtV8iHoKGKkOmThY3rCChVHiLgFj542MkKVUImOIX9oTK1omP1/
UXg872Ow179s3cneQP6Evm/qxxFmRGHmdNN4fN1eZOokLqhoWALM0ihJsbqJYrPq
UU8aEztsFCMmrw+f/L0AeXkH4teuM5fBR2nVpylXKcSFy1jgcn/hZq2Pvu4jyDzK
hmi0PGRpupXxQYOvFC2WJV4G0nWkb//3Zde9uSFOQPTkCxncdLfCIYOIgKXW6H+e
ZiSV66vFl8g8UgvAJeaUeg0QUJkOyIg9ZDXZalAHj/etIRVczqY=
=Hdq7
-----END PGP SIGNATURE-----