Re: [PATCH] Better Performance for PostgreSQL with large INSERTs

Поиск
Список
Период
Сортировка
От Philipp Marek
Тема Re: [PATCH] Better Performance for PostgreSQL with large INSERTs
Дата
Msg-id 76c7e047b7abde2308e2b4c23ab23a0c@marek.priv.at
обсуждение исходный текст
Ответ на Re: [PATCH] Better Performance for PostgreSQL with large INSERTs  (Philipp Marek <philipp@marek.priv.at>)
Список pgsql-hackers
Here's the patch again, this time with a 128kB buffer size.

This gives us nearly the same gains (~7%) for the blob INSERTs,
and the additional memory usage (120kB) shouldn't really matter,
with "temp_buffer"s 8MB and "work_mem" 4MB defaults.

Making it configurable would give a much more complex patch --
so I suggest just using this fixed size.


Thanks!


diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c
index 25f739a6..72d092b2 100644
--- a/src/backend/libpq/pqcomm.c
+++ b/src/backend/libpq/pqcomm.c
@@ -117,7 +117,7 @@ static List *sock_paths = NIL;
   */

  #define PQ_SEND_BUFFER_SIZE 8192
-#define PQ_RECV_BUFFER_SIZE 8192
+#define PQ_RECV_BUFFER_SIZE (128 * 1024)

  static char *PqSendBuffer;
  static int     PqSendBufferSize;       /* Size send buffer */



В списке pgsql-hackers по дате отправления: