| From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
|---|---|
| To: | Dmitrii Bondar <d(dot)bondar(at)postgrespro(dot)ru> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Pgbench: remove synchronous prepare |
| Date: | 2026-04-26 17:01:19 |
| Message-ID: | CA+TgmoZN2hfeqCrguSezTqPmxKE3jSf8Bnf1-o6ubexgVfj0sA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Mar 16, 2026 at 3:46 AM Dmitrii Bondar <d(dot)bondar(at)postgrespro(dot)ru> wrote:
> Rebase.
Hi,
I think that this patch is changing more behavior than is explained in
the commit message. The existing code calls PQsendQueryPrepared, which
only tries to execute an already-prepared query. The replacement code
tries to prepare the query. It is not clear to me what's going on
here. I would have expected that we would only ever reach that point
in the code with the query already prepared; otherwise, the existing
code would presumably fail. But if that is the case then how is the
new code managing to do anything different than the old code?
Another way to see that the patch must be changing more behavior than
advertised is the change to 001_pgbench_with_server.pl. That change
comes with no comment changes and no explanation of any kind.
If this patch were just about doing something asynchronously instead
of synchronously, I think that would be fine, but I don't think that's
all that is happening here. The original post explains the problem
behavior (pgbench freezing under certain circumstances) but I don't
understand what causes that behavior. I think I would understand
better if the original complaint were about something other than
session pooling mode: then, I might expect that we might unexpectedly
discover that our session does not have something prepared which we
expected to find prepared, and maybe this revised logic in
sendCommand() would somehow fix that. But in session pooling mode,
shouldn't everything be the same as if connection pooling is not in
use at all? What's actually different?
--
Robert Haas
EDB: http://www.enterprisedb.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | DaeMyung Kang | 2026-04-26 17:01:30 | [PATCH] Fix memory leak of primary_sysid in walreceiver |
| Previous Message | DaeMyung Kang | 2026-04-26 16:59:09 | [PATCH] Fix memory leak of reply_message in walreceiver |