From: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
---|---|
To: | Philipp Marek <philipp(at)marek(dot)priv(dot)at> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PATCH] Better Performance for PostgreSQL with large INSERTs |
Date: | 2025-09-15 13:23:07 |
Message-ID: | CALdSSPivbWB8dH1aLgrPdYDU7pFVKR8X4XH4_ndoPNFa4FPbag@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi!
On Mon, 15 Sept 2025 at 18:16, Philipp Marek <philipp(at)marek(dot)priv(dot)at> wrote:
>
> Sometimes, storing documents (eg. PDFs) in a database
> is much easier than using a separate storage (like S3, NFS, etc.).
>
> (Because of issues like backup integrity, availability,
> service dependencies, access rights, encryption of data, etc..)
>
>
> With this patch:
>
> ```diff
> diff --git i/src/backend/libpq/pqcomm.c w/src/backend/libpq/pqcomm.c
> index e517146..936b073 100644
> --- i/src/backend/libpq/pqcomm.c
> +++ w/src/backend/libpq/pqcomm.c
> @@ -117,7 +117,8 @@ static List *sock_paths = NIL;
> */
>
> #define PQ_SEND_BUFFER_SIZE 8192
> -#define PQ_RECV_BUFFER_SIZE 8192
> +#define PQ_RECV_BUFFER_SIZE 2097152
> +
Changing this constant will result in an overwhelming increase of
memory consumption for instances that work with a large number of
connections (
max_connections ~ 1e4) for zero benefit.
--
Best regards,
Kirill Reshke
From | Date | Subject | |
---|---|---|---|
Next Message | Andrey Borodin | 2025-09-15 13:27:35 | Re: Remove custom redundant full page write description from GIN |
Previous Message | Philipp Marek | 2025-09-15 13:16:33 | [PATCH] Better Performance for PostgreSQL with large INSERTs |