From: | Vaishnavi Prabakaran <vaishnaviprabakaran(at)gmail(dot)com> |
---|---|
To: | Daniel Verite <daniel(at)manitou-mail(dot)org> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, David Steele <david(at)pgmasters(dot)net>, "Prabakaran, Vaishnavi" <VaishnaviP(at)fast(dot)au(dot)fujitsu(dot)com>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>, Dmitry Igrishin <dmitigr(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Manuel Kniep <m(dot)kniep(at)web(dot)de>, "fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp" <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>, "Iwata, Aya" <iwata(dot)aya(at)jp(dot)fujitsu(dot)com> |
Subject: | Re: PATCH: Batch/pipelining support for libpq |
Date: | 2017-08-10 05:23:06 |
Message-ID: | CAOoUkxQM6H3a7y9UyD0c4eFhB_teVbfkVx67YTvkiVy+cyybqQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andres Freund wrote :
> 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.
Firstly, sorry for the delayed response as I got busy with other
activities.
To buffer up the queries before flushing them to the socket, I think
"conn->outCount>=65536" is ok to use, as 64k is considered to be safe in
Windows as per comments in pqSendSome() API.
Attached the code patch to replace pqFlush calls with pqBatchFlush in the
asynchronous libpq function calls flow.
Still pqFlush is used in "PQbatchSyncQueue" and
"PQexitBatchMode" functions.
Am failing to see the benefit in allowing user to set
PQBatchAutoFlush(true|false) property? Is it really needed?
Thanks & Regards,
Vaishnavi,
Fujitsu Australia.
Attachment | Content-Type | Size |
---|---|---|
0001-Pipelining-batch-support-for-libpq-code-v12.patch | application/octet-stream | 52.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Khandekar | 2017-08-10 05:34:36 | Re: Parallel Append implementation |
Previous Message | Craig Ringer | 2017-08-10 05:12:30 | Re: Walsender timeouts and large transactions |