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

From Jelte Fennema-Nio
Subject Re: Add Pipelining support in psql
Date
Msg-id CAGECzQTjCEXpJGOq9O6Nf+p4zRwjt-b1p6kACWVNJ+uYcLGvyg@mail.gmail.com
Whole thread Raw
List pgsql-hackers
On Wed, 27 Nov 2024 at 10:50, Anthonin Bonnefoy
<anthonin.bonnefoy@datadoghq.com> wrote:
> With \bind, \parse, \bind_named and \close, it is possible to issue
> queries from psql using the extended protocol. However, it wasn't
> possible to send those queries using pipelining and the only way to
> test pipelined queries was through pgbench's tap tests.

Big +1. Not being able to use psql for even the most basic pipeline
tests has definitely been an annoyance of mine.

I played around quickly with this patch and it works quite well. A few
things that would be nice improvements I think. Feel free to change
the command names:
1. Add a \flush command that calls PQflush
2. Add a \flushrequest command that calls PQsendFlushRequest
3. Add a \getresult command so you can get a result from a query
without having to close the pipeline

To be clear, not having those additional commands isn't a blocker for
this patch imho, but I'd definitely miss them if they weren't there
when I would be using it.



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Difference in dump from original and restored database due to NOT NULL constraints on children
Next
From: Ilia Evdokimov
Date:
Subject: Typo in comment of auto_explain.c