> I feel there's a large overlap between \flush and \flushrequest. On > the other hand, if people want to test the behaviour of pushing data > with and without a flush request message, then \flush can be useful.
I've been looking into some issues related to a backend process stuck in ClientWrite state blocking the WAL replay and it turns out that pipelining + \flush was extremely useful to reproduce the issue. It makes it possible to saturate the server->client socket buffer since psql doesn't consume the results, easily triggering the state where the process is stuck in ClientWrite. So I'm amending my position on the usefulness of \flush and definitely see interesting usages. I've also found out that I didn't correctly manage connection reset. I've fixed this in v6 by resetting the pipeline counters on connection reset and only calling discardAbortedPipelineResults if we're inside a pipeline.
v06-0001-Add-pipelining-support-in-psql.patch
Description: Binary data