| From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
|---|---|
| To: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
| Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: pgbench: make verbose error messages thread-safe |
| Date: | 2026-04-24 11:23:50 |
| Message-ID: | CAHGQGwGn3o8JOd+-u42tebtsRfdhgKGEsy+3SFR82=u=jfdDrQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Apr 24, 2026 at 6:06 PM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
> I am not too worried about that, because this code path is only used with --verbose-errors and only when printing error messages. In that situation, the cost of one extra memory allocation per log line should be much smaller than the I/O cost of writing the log message itself. So I think the simpler fix is probably acceptable.
Yes, I feel the same way.
> But if we really care about the performance problem, I think PQExpBuffer might be better stored in TState that is per thread, while CState is per connection.
Agreed.
Regards,
--
Fujii Masao
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Zhijie Hou (Fujitsu) | 2026-04-24 11:26:05 | RE: Parallel Apply |
| Previous Message | Amit Kapila | 2026-04-24 11:08:29 | Re: Parallel Apply |