Re: [HACKERS] PATCH: Batch/pipelining support for libpq - Mailing list pgsql-hackers

From Vaishnavi Prabakaran
Subject Re: [HACKERS] PATCH: Batch/pipelining support for libpq
Date
Msg-id CAOoUkxQM6H3a7y9UyD0c4eFhB_teVbfkVx67YTvkiVy+cyybqQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] PATCH: Batch/pipelining support for libpq  ("Daniel Verite" <daniel@manitou-mail.org>)
Responses Re: [HACKERS] PATCH: Batch/pipelining support for libpq  (Andres Freund <andres@anarazel.de>)
List 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

pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: [HACKERS] Walsender timeouts and large transactions
Next
From: Amit Khandekar
Date:
Subject: Re: [HACKERS] Parallel Append implementation