Re: Add Pipelining support in psql - Mailing list pgsql-hackers

From Anthonin Bonnefoy
Subject Re: Add Pipelining support in psql
Date
Msg-id CAO6_Xqo=fNh0KCRZG7T18OZfjiabeL-t4C6mkXsz-3dAZ1YwTA@mail.gmail.com
Whole thread Raw
In response to Re: Add Pipelining support in psql  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Add Pipelining support in psql
Re: Add Pipelining support in psql
List pgsql-hackers
On Tue, Mar 18, 2025 at 1:50 AM Michael Paquier <michael@paquier.xyz> wrote:
> - count
> --------
> -     4
> -(1 row)
>
> This removal done in the regression tests was not intentional.

Yes, thanks for fixing that.

> How about adding a check on PIPELINE_COMMAND_COUNT when sending a
> query through this path?  Should we check for more scenarios with
> syncs and flushes as well when sending these queries?

I've added additional tests when piping queries with ';':
- I've reused the same scenario with \sendpipeline: single query,
multiple queries, flushes, syncs, using COPY...
- Using ';' will replace the unnamed prepared statement. It's a bit
different from expected as a simple query will delete the unnamed
prepared statement.
- Sending an extended query prepared with \bind using a ';' on a
newline, though this is not specific to pipelining. The scanned
semicolon triggers the call to SendQuery, processing the buffered
extended query. It's a bit unusual but that's the current behaviour.

Attachment

pgsql-hackers by date:

Previous
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: doc patch: wrong descriptions for dropping replication slots
Next
From: Andrei Lepikhov
Date:
Subject: Re: [PATCH] Optionally record Plan IDs to track plan changes for a query