Re: [PATCH] Better Performance for PostgreSQL with large INSERTs - Mailing list pgsql-hackers

From Kirill Reshke
Subject Re: [PATCH] Better Performance for PostgreSQL with large INSERTs
Date
Msg-id CALdSSPivbWB8dH1aLgrPdYDU7pFVKR8X4XH4_ndoPNFa4FPbag@mail.gmail.com
Whole thread Raw
In response to [PATCH] Better Performance for PostgreSQL with large INSERTs  (Philipp Marek <philipp@marek.priv.at>)
Responses Re: [PATCH] Better Performance for PostgreSQL with large INSERTs
List pgsql-hackers
Hi!

On Mon, 15 Sept 2025 at 18:16, Philipp Marek <philipp@marek.priv.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



pgsql-hackers by date:

Previous
From: Philipp Marek
Date:
Subject: [PATCH] Better Performance for PostgreSQL with large INSERTs
Next
From: Andrey Borodin
Date:
Subject: Re: Remove custom redundant full page write description from GIN