Subject: Re: Add Pipelining support in psql

From: Michael Paquier <[email-masked]>
Date: Thu, 28 Nov 2024 15:43:04 +0900

On Wed, Nov 27, 2024 at 01:45:32PM +0100, Jelte Fennema-Nio wrote:
> 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.

Hmm.  The start, end and sync meta-commands are useful for testing.  I
find the flush control a bit less interesting, TBH.

What would you use these for?  Perhaps these ones would be better if
just applied to pgbench rather than psql where it is possible to pass
down custom SQL sequences with input files?
--
Michael

---

From: Jelte Fennema-Nio <[email-masked]>
Date: Thu, 28 Nov 2024 10:06:28 +0100

On Thu, 28 Nov 2024 at 07:43, Michael Paquier <[email-masked]> wrote:
> What would you use these for?

I guess mostly for interactively playing around with pipelining from psql.

But I think \getresult would be useful for testing too. This would
allow us to test that we can read part of the pipeline, without
sending a sync and waiting for everything.

To be clear \flushrequest and \flush would be necessary to make
\getresult work reliably.