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>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: Consider pipeline implicit transaction as a transaction block |
Date: | 2024-11-26 07:24:58 |
Message-ID: | Z0V3ymlYgV6BD8bS@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Nov 25, 2024 at 02:35:25PM +0100, Anthonin Bonnefoy wrote:
> 0001: Use implicit transaction block for the implicit pipeline
> transaction. I've added tests in pgbench that covered the same checks
> I did in psql. I've avoided using \syncpipeline since it was
> introduced in 17. I've also slightly modified the protocol-flow
> pipelining doc to provide more details on the implicit transaction
> block and how the first message after a sync can be different. I've
> added vacuum as first and second command of a pipeline in the tests
> since it was mentioned in the doc.
That looks acceptable and backpatchable to me. It is a bit sad that
pgbench does not capture the backend errors so as the output of the
tests is more predictable, but this is not new and I'm OK to expand
that with your proposal based on psql in v5-0002 with these new
meta-commands.
The patch provides positive and negative tests for REINDEX, VACUUM,
LOCK and SET LOCAL, which should be plenty enough. There is also a
negative check for subtransactions, which should never happen in
implicit transaction blocks. This last one is a must-have, thanks.
You are right to not use \syncpipeline for the base fix, still I am
tempted to add one extra test with a sequence like this one for only
one of the commands, just to check that the implicit transaction state
is enforced after a sync. Say this one with a WARNING check in the
output:
\startpipeline
SELECT 1;
\syncpipeline
SET LOCAL foo = bar;
\endpipeline
Tweaks of the tests across multiple stable branches happen all the
time, and adding one specific to 17~ is no big issue. I'm in the
middle of it but I'm lacking the steam to do so today. Will likely
finish tomorrow.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2024-11-26 07:53:39 | Re: Changing shared_buffers without restart |
Previous Message | Andrey M. Borodin | 2024-11-26 07:22:02 | Re: Amcheck verification of GiST and GIN |