Re: max_wal_senders

From: Andres Freund <andres(at)anarazel(dot)de>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Rick Otten <rottenwindfish(at)gmail(dot)com>, "pgsql-performa(dot)" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: max_wal_senders
Date: 2023-02-09 06:40:12
Message-ID: 20230209064012.4txdzjzp2rkkms66@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi,

On 2023-02-09 06:59:53 +0100, Laurenz Albe wrote:
> On Wed, 2023-02-08 at 18:07 -0500, Rick Otten wrote:
> > I've been thinking about the max_wal_senders parameter lately and wondering if there
> > is any harm in setting it too high.
>
> No, there isn't, except that if you end up having too many *actual* WAL senders, it
> will cause load. A high limit is no problem as such.

That's not *quite* true. The downsides are basically the same as for
max_connections (It's basically treated the same, see
InitializeMaxBackends()): You need more shared memory. There's a small
degradation of performance due to the increased size of some shared
datastructures, most prominently the lock table for heavyweight locks.

Greetings,

Andres Freund

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Mark Hills 2023-02-09 10:56:35 Re: Domain check taking place unnecessarily?
Previous Message Laurenz Albe 2023-02-09 05:59:53 Re: max_wal_senders