diff --git a/src/backend/libpq/be-secure.c b/src/backend/libpq/be-secure.c
index 59204cf..98ee41e 100644
--- a/src/backend/libpq/be-secure.c
+++ b/src/backend/libpq/be-secure.c
@@ -75,6 +75,7 @@
 #endif   /* USE_SSL */
 
 #include "libpq/libpq.h"
+#include "miscadmin.h"
 #include "tcop/tcopprot.h"
 #include "utils/memutils.h"
 
@@ -457,6 +458,9 @@ wloop:
 #endif
 		n = send(port->sock, ptr, len, 0);
 
+	fprintf(stderr, "#### [%d] (bare) rest = %d / %d bytes, ProcDiePending = %d\n",
+			getpid(), len - n, len, ProcDiePending);
+
 	return n;
 }
 
@@ -514,6 +518,8 @@ my_sock_write(BIO *h, const char *buf, int size)
 	int			res = 0;
 
 	res = send(h->num, buf, size, 0);
+	fprintf(stderr, "#### [%d] (SSL) rest = %d / %d bytes, ProcDiePending = %d\n",
+			getpid(), size - res, size, ProcDiePending);
 	BIO_clear_retry_flags(h);
 	if (res <= 0)
 	{
diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c
index 605d891..259b6ac 100644
--- a/src/backend/libpq/pqcomm.c
+++ b/src/backend/libpq/pqcomm.c
@@ -114,7 +114,7 @@ static List *sock_paths = NIL;
  * enlarged by pq_putmessage_noblock() if the message doesn't fit otherwise.
  */
 
-#define PQ_SEND_BUFFER_SIZE 8192
+#define PQ_SEND_BUFFER_SIZE (8192 * 10)
 #define PQ_RECV_BUFFER_SIZE 8192
 
 static char *PqSendBuffer;
