Hi, On 2017-06-22 13:43:35 +0200, Daniel Verite wrote: > But OTOH there are certainly batch workloads where it will be preferrable > for the first query to reach the server ASAP, rather than waiting to be > coalesced with the next ones.
Is that really something people expect from a batch API? I suspect it's not really, and nothing would stop one from adding PQflush() or similar calls if desirable anyway. FWIW, the way I did that in the hack clearly isn't ok: If you were to send a gigabyte of queries, it'd buffer them all up in memory... So some more intelligence is going to be needed. > libpq is not going to know what's best. > One option may be to leave that decision to the user by providing a > PQBatchAutoFlush(true|false) property, along with a PQBatchFlush() > function. What'd be the difference between PQflush() and PQbatchFlush()? Greetings, Andres Freund -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers