Re: [HACKERS] Libpq optimization

2005-10-26 Thread Alon Goldshuv
Tom, > And, unfortunately, you've broken it. The pqFlush call visible in that > routine is not the only place that may try to send data (see also > pqPutMsgEnd). You are right, thanks for pointing that out. Still, in pqPutMsgEnd we will be sending data only after 8K is reached, which is about o

Re: [HACKERS] Libpq optimization

2005-10-26 Thread Tom Lane
"Alon Goldshuv" <[EMAIL PROTECTED]> writes: > As the code comment suggests, it is extremely important to consume incoming > messages from the server to prevent deadlock. However we should only worry > about it before sending data out. And, unfortunately, you've broken it. The pqFlush call visible

[HACKERS] Libpq optimization

2005-10-26 Thread Alon Goldshuv
In the libpq COPY interface function PQputCopyData(): /* * Check for NOTICE messages coming back from the server. Since the * server might generate multiple notices during the COPY, we have to * consume those in a reasonably prompt fashion to prevent the comm * buffers from filling up and pos