Re: [HACKERS] PATCH: Batch/pipelining support for libpq
От | Andres Freund |
---|---|
Тема | Re: [HACKERS] PATCH: Batch/pipelining support for libpq |
Дата | |
Msg-id | 20170622155204.c7n5ahf2tlr2mtyn@alap3.anarazel.de обсуждение исходный текст |
Ответ на | Re: [HACKERS] PATCH: Batch/pipelining support for libpq ("Daniel Verite" <daniel@manitou-mail.org>) |
Ответы |
Re: [HACKERS] PATCH: Batch/pipelining support for libpq
|
Список | pgsql-hackers |
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
В списке pgsql-hackers по дате отправления: