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

From: Philipp Marek <philipp(at)marek(dot)priv(dot)at>
To: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Better Performance for PostgreSQL with large INSERTs
Date: 2025-09-15 13:40:24
Message-ID: b3452323499e5f5e87a541a14fcb1e0e@marek.priv.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Kirill,

> 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.

No, it's not that bad.

1) With this being allocated in the bss segment,
the RAM will only be actually be provided on _first use_ --
so processes that only ever work with small queries will see no
difference.

2) With temp_buffers' default of 8MB, work_mem using 4MB, etc.,
using an additional 256kB RAM to 2MB _when needed_ is a good deal
for about 7% performance improvements.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Natalya Aksman 2025-09-15 13:50:56 Re: Adding skip scan (including MDAM style range skip scan) to nbtree
Previous Message Andrey Borodin 2025-09-15 13:27:35 Re: Remove custom redundant full page write description from GIN