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: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgbench - use pg logging capabilities
Date: 2020-01-10 00:06:24
Message-ID: 20200110000624.GB1702@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2020-01-10 00:22:45 Re: standby recovery fails (tablespace related) (tentative patch and discussion)
Previous Message Tom Lane 2020-01-09 23:51:41 Re: logical decoding : exceeded maxAllocatedDescs for .spill files