From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com> |
Cc: | Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Add Pipelining support in psql |
Date: | 2025-02-21 02:33:41 |
Message-ID: | Z7fmBYDCxWSoZXEs@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Feb 20, 2025 at 10:29:33AM +0100, Anthonin Bonnefoy wrote:
> Ha yeah, I forgot about the inactive branches. I've added the new
> commands and fixed the behaviour.
And I did not notice that it was as simple as forcing the status in
the routines for the new meta-commands, as we do for the existing
ones. Noted.
> This looks more like an issue on libpq's side as there's no way to
> reset or advance the errorReported from ExecQueryAndProcessResults
> (plus PQerrorMessage seems to ignore errorReported). I've added an
> additional test to track this behaviour for now as this would probably
> be better discussed in a dedicated thread.
I am not sure if we should change that, actually, as it does not feel
completely wrong to stack these errors. That's a bit confusing,
sure. Perhaps a new libpq API to retrieve stacked errors when we are
in pipeline mode would be more adapted? The design would be
different.
Anyway, I've stared at the result processing code for a couple of
hours, and the branches we're taking for the pipeline modes seem to be
rather right the way you have implemented them. The docs, comments
and tests needed quite a few tweaks and edits to be more consistent.
There were some grammar mistakes, some frenchisms.
I'm hoping that there won't be any issues, but let's be honest, I am
definitely sure there will be some more tuning required. It comes
down to if we want this set of features, and I do to be able to expand
tests in core with the extended query protocol and pipelines, knowing
that there is an ask for out-of-core projects. This one being
reachable with a COPY gave me a huge smile:
+message type 0x5a arrived from server while idle
So let's take one step here, I have applied the main patch. I am
really excited by the possibilities all this stuff offers.
Attached are the remaining pieces, split here because they are
different bullet points:
- Tests for implicit transactions with various commands, with some
edits.
- Prompt support, with more edits.
I'm putting these on standby for a few days, to let the buildfarm
digest the main change.
--
Michael
Attachment | Content-Type | Size |
---|---|---|
v10-0001-Add-tests-with-implicit-transaction-blocks-and-p.patch | text/x-diff | 5.8 KB |
v10-0002-Add-prompt-interpolation-and-variables-for-psql-.patch | text/x-diff | 6.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2025-02-21 02:45:18 | Re: Extend postgres_fdw_get_connections to return remote backend pid |
Previous Message | Ajin Cherian | 2025-02-21 02:27:17 | Re: Proposal: Filter irrelevant change before reassemble transactions during logical decoding |